Skip to content

Commit

Permalink
chore: fix build tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelo-portugal authored and mportuga committed Jan 12, 2023
1 parent 6d3f006 commit 76f5b9c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions grunt/aliases.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ module.exports = function (grunt, options) {
var currentTag = semver.clean( util.getCurrentTag() );

if (currentTag) {
baseTasks['release'] = ['clean', 'build', 'cut-release', 'gh-pages:ui-grid-site', 'update-bower-json', 'gh-pages:bower', 'npm-publish'];
baseTasks['release'] = ['cut-release', 'gh-pages:ui-grid-site', 'update-bower-json', 'gh-pages:bower', 'npm-publish'];
}
else {
baseTasks['release'] = ['clean', 'build', 'cut-release'];
baseTasks['release'] = ['cut-release'];
}

return baseTasks;
Expand Down
8 changes: 4 additions & 4 deletions grunt/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = function ( grunt ) {

packages.forEach(function(feat) {
let featModuleName = '.' + _.camelCase(feat);
let featMainPath = `./js/${package.name}.${feat}`;
let featMainPath = `./dist/${package.name}.${feat}`;

switch(feat) {
case 'cellnav':
Expand Down Expand Up @@ -185,7 +185,7 @@ module.exports = function ( grunt ) {
expand: true,
flatten: true,
cwd: 'packages',
src: '*/js/*.js',
src: '*/dist/*.js',
dest: '<%= dist %>/release',
filter: function(filepath) {
return !filepath.includes('packages/i18n')
Expand All @@ -195,15 +195,15 @@ module.exports = function ( grunt ) {
expand: true,
flatten: true,
cwd: 'packages',
src: '*/js/*.js',
src: '*/i18n/dist/*.js',
dest: '<%= dist %>/release/i18n',
filter: 'isFile'
},
{
expand: true,
flatten: true,
cwd: 'packages',
src: '*/css/*.css',
src: '*/dist/*.css',
dest: '<%= dist %>/release/css',
filter: 'isFile'
}
Expand Down
4 changes: 2 additions & 2 deletions lib/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const {bannerLoader, terser} = require('./webpack.utils');

module.exports = (dir, name, hasCss = false) => {
const packageName = name.replace('@ui-grid/', '')
const packageName = _.camelCase(name.replace('@ui-grid/', ''))
const mainJs = './src/index.js';
const entry = hasCss ? [mainJs, `./less/${_.camelCase(packageName)}.less`] : [mainJs];
const entry = hasCss ? [mainJs, `./less/${packageName}.less`] : [mainJs];
const htmlLoader = {
test: /\.html$/i,
include: path.resolve(dir, 'src'),
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"main": "./index.js",
"scripts": {
"bootstrap": "lerna bootstrap",
"build": "grunt build",
"pre-build": "grunt clean",
"build-dx": "npm run pre-build && webpack && npm run less && lerna run build",
"build": "npm run pre-build && webpack && npm run less && lerna run build && npm run post-build",
"post-build": "grunt uidocs-generator copy:site copy:font_dist copy:less_customizer copy:less_dist copy:packages_dist copy:packages_publish",
"less": "npm run less-main && npm run less-min",
"less-main": "lessc -rp=\"../\" ./lib/less/main.less dist/release/css/ui-grid.css",
"less-min": "lessc -rp=\"../\" --compress -x ./lib/less/main.less dist/release/css/ui-grid.min.css",
Expand All @@ -23,6 +23,7 @@
"lerna": "lerna",
"lint": "eslint packages/*/src/**/*.js packages/*/test/**/*.spec.js test/**/*.spec.js",
"postinstall": "bower install",
"pre-release": "grunt release",
"release": "lerna publish from-package",
"start": "grunt dev --fast",
"test": "grunt test",
Expand Down

0 comments on commit 76f5b9c

Please sign in to comment.