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:
parent
e8716a3cfe
commit
92952711cb
@ -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
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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" ]
|
||||
}
|
||||
})
|
||||
})
|
Loading…
Reference in New Issue
Block a user