Skip to content

Commit

Permalink
WORKING: npm run build w/o ugly, ngAn
Browse files Browse the repository at this point in the history
  • Loading branch information
1ambda committed Dec 28, 2016
1 parent d1352d0 commit b0c7d01
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 61 deletions.
11 changes: 6 additions & 5 deletions zeppelin-web/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ module.exports = function(grunt) {
// concat, minify and revision files. Creates configurations in memory so
// additional tasks can operate on them
useminPrepare: {
html: '<%= yeoman.app %>/index.html',
html: '<%= yeoman.dist %>/index.html',
options: {
dest: '<%= yeoman.dist %>',
flow: {
Expand Down Expand Up @@ -488,7 +488,6 @@ module.exports = function(grunt) {
src: [
'*.{ico,png,txt}',
'.htaccess',
'*.html',
'assets/styles/**/*',
'assets/images/**/*',
'WEB-INF/*'
Expand Down Expand Up @@ -580,7 +579,7 @@ module.exports = function(grunt) {
}
});

grunt.registerTask('prepare-webpack', 'Compile then start a connect web server', function(target) {
grunt.registerTask('pre-webpack-dev', 'Compile then start a connect web server', function(target) {
if (target === 'dist') {
return grunt.task.run(['build', 'connect:dist:keepalive']);
}
Expand All @@ -591,17 +590,19 @@ module.exports = function(grunt) {
]);
});

grunt.registerTask('build', [
grunt.registerTask('pre-webpack-dist', [
'jscs',
'eslint',
'htmlhint',
'clean:dist',
'wiredep',
]);

grunt.registerTask('post-webpack-dist', [
'useminPrepare',
'concurrent:dist',
'postcss',
'concat',
'babel:dist',
'ngAnnotate',
'copy:dist',
'cssmin',
Expand Down
5 changes: 3 additions & 2 deletions zeppelin-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
},
"scripts": {
"postinstall": "bower install --silent && grunt googlefonts",
"build": "grunt build",
"start": "grunt prepare-webpack && webpack-dev-server --port 9000 --history-api-fallback --inline --progress",
"build": "grunt pre-webpack-dist && webpack && grunt post-webpack-dist",
"start": "grunt pre-webpack-dev && webpack-dev-server --port 9000 --history-api-fallback --inline --progress",
"test": "karma start test/karma.conf.js",
"pretest": "npm install karma-phantomjs-launcher"
},
Expand Down Expand Up @@ -51,6 +51,7 @@
"grunt-postcss": "^0.7.1",
"grunt-svgmin": "^0.4.0",
"grunt-usemin": "^2.1.1",
"grunt-webpack": "^1.0.18",
"grunt-wiredep": "~2.0.0",
"html-webpack-plugin": "^2.24.1",
"jasmine-core": "^2.5.2",
Expand Down
49 changes: 0 additions & 49 deletions zeppelin-web/src/fonts/google-fonts.css

This file was deleted.

7 changes: 2 additions & 5 deletions zeppelin-web/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,18 +187,15 @@ module.exports = function makeWebpackConfig () {

// Reference: http://webpack.github.io/docs/list-of-plugins.html#dedupeplugin
// Dedupe modules in the output
new webpack.optimize.DedupePlugin(),
// new webpack.optimize.DedupePlugin(),

// Reference: http://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin
// Minify all javascript, switch loaders to minimizing mode
new webpack.optimize.UglifyJsPlugin(),
// new webpack.optimize.UglifyJsPlugin(),

// Copy assets from the public folder
// Reference: https://github.com/kevlened/copy-webpack-plugin
new CopyWebpackPlugin([
{ from: 'src/assets/**/*', to: 'assets', },
{ from: 'src/fonts/**/*', to: 'fonts', },
{ from: 'bower_components/**/*', to: 'bower_components', },
])
)
}
Expand Down

0 comments on commit b0c7d01

Please sign in to comment.