mirror of https://github.com/Chocobozzz/PeerTube
I'm fed up with Gruntfile
parent
6f4e252246
commit
ccfd23dfe5
83
Gruntfile.js
83
Gruntfile.js
|
@ -1,83 +0,0 @@
|
|||
'use strict'
|
||||
|
||||
module.exports = function (grunt) {
|
||||
var paths = {
|
||||
css: 'client/stylesheets/*.css',
|
||||
scss: 'client/stylesheets/application.scss',
|
||||
vendor: 'client/stylesheets/vendor',
|
||||
routes: './server/controllers/**/*.js',
|
||||
main: './server.js',
|
||||
img: 'public/images/*.{png,jpg,jpeg,gif,webp,svg}',
|
||||
test: 'tests',
|
||||
server: 'server.js'
|
||||
}
|
||||
|
||||
require('time-grunt')(grunt)
|
||||
|
||||
// Project Configuration
|
||||
grunt.initConfig({
|
||||
paths: paths,
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
concurrent: {
|
||||
options: {
|
||||
logConcurrentOutput: true
|
||||
},
|
||||
dev: [ 'watch:livereload', 'watch:sass', 'express:dev' ]
|
||||
},
|
||||
copy: {
|
||||
dev: {
|
||||
cwd: 'node_modules/bootstrap-sass/assets/',
|
||||
src: [ 'fonts/bootstrap/*' ],
|
||||
expand: true,
|
||||
dest: paths.vendor
|
||||
}
|
||||
},
|
||||
clean: {
|
||||
dev: {
|
||||
files: [{
|
||||
dot: true,
|
||||
src: [
|
||||
paths.browserified, 'public/stylesheets/global.css', paths.vendor
|
||||
]
|
||||
}]
|
||||
}
|
||||
},
|
||||
express: {
|
||||
dev: {
|
||||
options: {
|
||||
script: paths.server,
|
||||
harmony: true,
|
||||
port: 9000,
|
||||
node_env: 'development',
|
||||
debug: true,
|
||||
background: false
|
||||
}
|
||||
}
|
||||
},
|
||||
sass: {
|
||||
options: {
|
||||
includePaths: [ 'node_modules/bootstrap-sass/assets/stylesheets/' ]
|
||||
},
|
||||
dev: {
|
||||
files: {
|
||||
'client/stylesheets/global.css': paths.scss
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// Load automatically all the tasks
|
||||
require('load-grunt-tasks')(grunt)
|
||||
|
||||
// Build client javascript and copy bootstrap dependencies
|
||||
grunt.registerTask('build', [ 'sass:dev', 'newer:copy:dev' ])
|
||||
|
||||
// Clean build
|
||||
grunt.registerTask('clean', [], function () {
|
||||
grunt.loadNpmTasks('grunt-contrib-clean')
|
||||
|
||||
grunt.task.run(
|
||||
'clean:dev'
|
||||
)
|
||||
})
|
||||
}
|
|
@ -54,7 +54,6 @@ Thanks to [webtorrent](https://github.com/feross/webtorrent), we can make P2P (t
|
|||
### Dependencies
|
||||
|
||||
* **NodeJS >= 4.2**
|
||||
* Grunt-cli (npm install -g grunt-cli)
|
||||
* OpenSSL (cli)
|
||||
* MongoDB
|
||||
* xvfb-run libgtk2.0-0 libgconf-2-4 libnss3 libasound2 libxtst6 libxss1 (for electron)
|
||||
|
@ -64,7 +63,6 @@ Thanks to [webtorrent](https://github.com/feross/webtorrent), we can make P2P (t
|
|||
Install NodeJS 4.2: [https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions)
|
||||
|
||||
# apt-get install mongodb openssl xvfb curl sudo git build-essential libgtk2.0-0 libgconf-2-4 libnss3 libasound2 libxtst6 libxss1
|
||||
# npm install -g grunt-cli
|
||||
# npm install -g electron-prebuilt
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
typings
|
||||
app/**/*.js
|
||||
app/**/*.map
|
||||
stylesheets/index.css
|
||||
app/*.css
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
h1 {
|
||||
font-size: 80px;
|
||||
}
|
|
@ -1 +1 @@
|
|||
<h1>My First Angular 2 App</h1>
|
||||
<h1>{{ title }}</h1>
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
h1 {
|
||||
font-size: 100px;
|
||||
}
|
|
@ -5,4 +5,6 @@ import {Component} from 'angular2/core';
|
|||
templateUrl: 'app/app.component.html',
|
||||
styleUrls: [ 'app/app.component.css' ]
|
||||
})
|
||||
export class AppComponent { }
|
||||
export class AppComponent {
|
||||
title = "coucou";
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
<title>Angular 2 QuickStart</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
<link rel="stylesheet" href="/stylesheets/index.css">
|
||||
|
||||
<!-- 1. Load libraries -->
|
||||
<!-- IE required polyfills, in this exact order -->
|
||||
|
|
|
@ -21,17 +21,16 @@
|
|||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"angular2": "2.0.0-beta.8",
|
||||
"systemjs": "0.19.22",
|
||||
"bootstrap-sass": "^3.3.6",
|
||||
"es6-promise": "^3.0.2",
|
||||
"es6-shim": "^0.33.3",
|
||||
"reflect-metadata": "0.1.2",
|
||||
"rxjs": "5.0.0-beta.2",
|
||||
"systemjs": "0.19.22",
|
||||
"zone.js": "0.5.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^2.0.0",
|
||||
"lite-server": "^2.1.0",
|
||||
"typescript": "^1.8.2",
|
||||
"typings":"^0.6.8"
|
||||
"typings": "^0.6.8"
|
||||
}
|
||||
}
|
||||
|
|
37
package.json
37
package.json
|
@ -17,15 +17,29 @@
|
|||
"url": "git://github.com/Chocobozzz/PeerTube.git"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "grunt dev",
|
||||
"test": "grunt build && standard && mocha tests"
|
||||
"build": "concurrently \"npm run client:sass\" \"npm run client:tsc\"",
|
||||
"client:clean": "concurrently \"npm run client:tsc:clean\" \"npm run client:sass:clean\"",
|
||||
"client:sass:index": "npm run client:sass:index:clean && cd client && node-sass --include-path node_modules/bootstrap-sass/assets/stylesheets/ stylesheets/application.scss stylesheets/index.css",
|
||||
"client:sass:index:watch": "npm run client:sass:index:clean && cd client && node-sass -w --include-path node_modules/bootstrap-sass/assets/stylesheets/ stylesheets/application.scss stylesheets/index.css",
|
||||
"client:sass:index:clean": "cd client && rm -f stylesheets/index.css",
|
||||
"client:sass:app": "cd client && node-sass app/ --output app/",
|
||||
"client:sass:app:watch": "cd client && node-sass -w app/ --output app/",
|
||||
"client:sass:app:clean": "cd client && rm -f app/*.css",
|
||||
"client:sass": "concurrently \"npm run client:sass:index\" \"npm run client:sass:app\"",
|
||||
"client:sass:watch": "concurrently \"npm run client:sass:index:watch\" \"npm run client:sass:app:watch\"",
|
||||
"client:sass:clean": "concurrently \"npm run client:sass:index:clean\" \"npm run client:sass:app:clean\"",
|
||||
"client:tsc": "cd client && npm run tsc",
|
||||
"client:tsc:watch": "cd client && npm run tsc:w",
|
||||
"client:tsc:clean": "cd client && rm -f app/*.js app/*.js.map",
|
||||
"dev": "concurrently \"npm run livereload\" \"npm run client:tsc:watch\" \"npm run client:sass:watch\" \"npm start\"",
|
||||
"livereload": "livereload ./client",
|
||||
"start": "node server",
|
||||
"test": "standard && mocha tests"
|
||||
},
|
||||
"dependencies": {
|
||||
"async": "^1.2.1",
|
||||
"bittorrent-tracker": "^7.0.0",
|
||||
"blueimp-file-upload": "^9.10.1",
|
||||
"body-parser": "^1.12.4",
|
||||
"bootstrap-sass": "^3.3.5",
|
||||
"config": "^1.14.0",
|
||||
"connect-livereload": "^0.5.3",
|
||||
"debug": "^2.2.0",
|
||||
|
@ -33,19 +47,7 @@
|
|||
"electron-spawn": "https://github.com/Chocobozzz/electron-spawn",
|
||||
"express": "^4.12.4",
|
||||
"express-validator": "^2.11.0",
|
||||
"grunt": "^0.4.5",
|
||||
"grunt-browserify": "^4.0.1",
|
||||
"grunt-concurrent": "^2.1.0",
|
||||
"grunt-contrib-clean": "^1.0.0",
|
||||
"grunt-contrib-copy": "0.8.2",
|
||||
"grunt-contrib-watch": "^0.6.1",
|
||||
"grunt-express-server": "^0.5.1",
|
||||
"grunt-newer": "^1.1.1",
|
||||
"grunt-sass": "^1.1.0",
|
||||
"jade": "^1.10.0",
|
||||
"jquery": "^2.1.4",
|
||||
"js-yaml": "^3.3.1",
|
||||
"load-grunt-tasks": "^3.3.0",
|
||||
"lodash-node": "^3.10.2",
|
||||
"mkdirp": "^0.5.1",
|
||||
"mongoose": "^4.0.5",
|
||||
|
@ -56,7 +58,6 @@
|
|||
"request": "^2.57.0",
|
||||
"request-replay": "^1.0.2",
|
||||
"segfault-handler": "^1.0.0",
|
||||
"time-grunt": "^1.2.1",
|
||||
"ursa": "^0.9.1",
|
||||
"validator": "^5.0.0",
|
||||
"webtorrent": "^0.78.1",
|
||||
|
@ -66,6 +67,8 @@
|
|||
"devDependencies": {
|
||||
"chai": "^3.3.0",
|
||||
"mocha": "^2.3.3",
|
||||
"node-livereload": "^0.6.0",
|
||||
"node-sass": "^3.4.2",
|
||||
"standard": "^6.0.1",
|
||||
"supertest": "^1.1.0"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue