1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-01-10 12:24:20 +01:00

improvements to build system

This commit is contained in:
Enrico Fasoli 2015-11-14 01:07:52 +01:00
parent e8716a3cfe
commit 92952711cb
3 changed files with 8 additions and 29 deletions

View File

@ -17,11 +17,6 @@ var config = {
dest: 'webapp/dist/'
}
config.browserify = browserify({
entries: config.files.mainJs,
transform: [ reactify ]
})
gulp.task('css',function(){
gulp.src(config.files.css)
.pipe(minifyCss())
@ -34,7 +29,9 @@ gulp.task('html',function(){
})
gulp.task('js',function(){
config.browserify.bundle()
browserify(config.files.mainJs)
.transform('babelify', { presets: [ 'es2015', 'react' ]})
.bundle()
.on('error', console.error.bind(console))
.pipe(source('app.js')) // do this or browserify won't work
.pipe(buffer()) // do this or uglify won't work

View File

@ -19,6 +19,9 @@
"author": "Enrico Fasoli (fazo96)",
"license": "MIT",
"dependencies": {
"babel-preset-es2015": "^6.1.18",
"babel-preset-react": "^6.1.18",
"babelify": "^7.2.0",
"browserify": "^12.0.1",
"commander": "^2.9.0",
"express": "^4.13.3",
@ -28,7 +31,8 @@
"gulp-uglify": "^1.5.1",
"ipfs-api": "^2.6.2",
"moment": "^2.10.6",
"reactify": "^1.1.1",
"react": "^0.14.2",
"react-dom": "^0.14.2",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0"
}

View File

@ -1,22 +0,0 @@
var boards = angular.module('boards',['ui.router'])
boards.config(function($stateProvider,$urlRouterProvider,$locationProvider){
$urlRouterProvider.otherwise('/')
//$locationProvider.html5Mode({ enabled: true, requireBase: false })
$stateProvider.state('home',{
url: '/',
templateUrl: 'home.html',
controller: function($scope){
}
})
$stateProvider.state('board',{
url: '/board/:name',
templateUrl: 'board.html',
controller: function($scope,$stateParams){
$scope.posts = [ "hey", "test", "something" ]
}
})
})