Skip to content

Commit

Permalink
WORKING: Setup command properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
1ambda committed Dec 28, 2016
1 parent d715d2a commit b8acc28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 37 deletions.
42 changes: 7 additions & 35 deletions zeppelin-web/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,26 +421,6 @@ module.exports = function(grunt) {

// Copies remaining files to places other tasks can use
copy: {
webpack: {
files: [
{
expand: true,
cwd: 'bower_components',
src: ['**/*'],
dest: '.tmp/bower_components',
},
{
expand: true,
cwd: '<%= yeoman.app %>',
src: [
'app/tabledata/**/*.html',
'app/tabledata/**/*.js',
'app/visualization/**/*.html',
'app/visualization/**/*.js',
],
dest: '.tmp',
}]
},
dev: {
files: [{
expand: true,
Expand Down Expand Up @@ -487,6 +467,11 @@ module.exports = function(grunt) {
cwd: 'bower_components/jquery-ui/themes/base/images',
src: '{,*/}*.{png,jpg,jpeg,gif}',
dest: '.tmp/styles/images'
}, {
expand: true,
cwd: 'bower_components',
src: ['**/*'],
dest: '.tmp/bower_components',
}, {
expand: true,
cwd: 'bower_components/ngclipboard',
Expand Down Expand Up @@ -599,28 +584,15 @@ module.exports = function(grunt) {
}
});

grunt.registerTask('webpack', 'Prepare webpack build', function(target) {
grunt.task.run([
// 'clean:server',
// 'copy:webpack',
// 'copy:dev',
// 'postcss',
]);
});

grunt.registerTask('serve', 'Compile then start a connect web server', function(target) {
grunt.registerTask('prepare-webpack', 'Compile then start a connect web server', function(target) {
if (target === 'dist') {
return grunt.task.run(['build', 'connect:dist:keepalive']);
}

grunt.task.run([
'clean:server',
'wiredep',
'concurrent:server',
'copy:dev',
'postcss',
'babel:dev',
'connect:livereload',
'watch'
]);
});

Expand Down
3 changes: 1 addition & 2 deletions zeppelin-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"scripts": {
"postinstall": "bower install --silent && grunt googlefonts",
"build": "grunt build",
"webpack": "grunt webpack && webpack-dev-server --port 9000 --history-api-fallback --inline --progress",
"start": "grunt serve",
"start": "grunt prepare-webpack && webpack-dev-server --port 9000 --history-api-fallback --inline --progress",
"test": "grunt test",
"pretest": "npm install karma-phantomjs-launcher"
},
Expand Down

0 comments on commit b8acc28

Please sign in to comment.