aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-03-07 18:01:56 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-03-07 18:01:56 +0100
commitccfd23dfe5c0ede1958804e8a36b4b336307a67e (patch)
treeac6f3a04dcb26fb6aa677c7045e93acc33fe26ab
parent6f4e252246c715a1dafc1e236c8074b08cdd12a3 (diff)
downloadPeerTube-ccfd23dfe5c0ede1958804e8a36b4b336307a67e.tar.gz
PeerTube-ccfd23dfe5c0ede1958804e8a36b4b336307a67e.tar.zst
PeerTube-ccfd23dfe5c0ede1958804e8a36b4b336307a67e.zip
I'm fed up with Gruntfile
-rw-r--r--Gruntfile.js83
-rw-r--r--README.md2
-rw-r--r--client/.gitignore2
-rw-r--r--client/app/app.component.css3
-rw-r--r--client/app/app.component.html2
-rw-r--r--client/app/app.component.scss3
-rw-r--r--client/app/app.component.ts4
-rw-r--r--client/index.html2
-rw-r--r--client/package.json7
-rw-r--r--package.json37
10 files changed, 33 insertions, 112 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
deleted file mode 100644
index 15e75247e..000000000
--- a/Gruntfile.js
+++ /dev/null
@@ -1,83 +0,0 @@
1'use strict'
2
3module.exports = function (grunt) {
4 var paths = {
5 css: 'client/stylesheets/*.css',
6 scss: 'client/stylesheets/application.scss',
7 vendor: 'client/stylesheets/vendor',
8 routes: './server/controllers/**/*.js',
9 main: './server.js',
10 img: 'public/images/*.{png,jpg,jpeg,gif,webp,svg}',
11 test: 'tests',
12 server: 'server.js'
13 }
14
15 require('time-grunt')(grunt)
16
17 // Project Configuration
18 grunt.initConfig({
19 paths: paths,
20 pkg: grunt.file.readJSON('package.json'),
21 concurrent: {
22 options: {
23 logConcurrentOutput: true
24 },
25 dev: [ 'watch:livereload', 'watch:sass', 'express:dev' ]
26 },
27 copy: {
28 dev: {
29 cwd: 'node_modules/bootstrap-sass/assets/',
30 src: [ 'fonts/bootstrap/*' ],
31 expand: true,
32 dest: paths.vendor
33 }
34 },
35 clean: {
36 dev: {
37 files: [{
38 dot: true,
39 src: [
40 paths.browserified, 'public/stylesheets/global.css', paths.vendor
41 ]
42 }]
43 }
44 },
45 express: {
46 dev: {
47 options: {
48 script: paths.server,
49 harmony: true,
50 port: 9000,
51 node_env: 'development',
52 debug: true,
53 background: false
54 }
55 }
56 },
57 sass: {
58 options: {
59 includePaths: [ 'node_modules/bootstrap-sass/assets/stylesheets/' ]
60 },
61 dev: {
62 files: {
63 'client/stylesheets/global.css': paths.scss
64 }
65 }
66 }
67 })
68
69 // Load automatically all the tasks
70 require('load-grunt-tasks')(grunt)
71
72 // Build client javascript and copy bootstrap dependencies
73 grunt.registerTask('build', [ 'sass:dev', 'newer:copy:dev' ])
74
75 // Clean build
76 grunt.registerTask('clean', [], function () {
77 grunt.loadNpmTasks('grunt-contrib-clean')
78
79 grunt.task.run(
80 'clean:dev'
81 )
82 })
83}
diff --git a/README.md b/README.md
index 87117f5f4..0477f3485 100644
--- a/README.md
+++ b/README.md
@@ -54,7 +54,6 @@ Thanks to [webtorrent](https://github.com/feross/webtorrent), we can make P2P (t
54### Dependencies 54### Dependencies
55 55
56 * **NodeJS >= 4.2** 56 * **NodeJS >= 4.2**
57 * Grunt-cli (npm install -g grunt-cli)
58 * OpenSSL (cli) 57 * OpenSSL (cli)
59 * MongoDB 58 * MongoDB
60 * xvfb-run libgtk2.0-0 libgconf-2-4 libnss3 libasound2 libxtst6 libxss1 (for electron) 59 * 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
64Install 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) 63Install 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)
65 64
66 # apt-get install mongodb openssl xvfb curl sudo git build-essential libgtk2.0-0 libgconf-2-4 libnss3 libasound2 libxtst6 libxss1 65 # apt-get install mongodb openssl xvfb curl sudo git build-essential libgtk2.0-0 libgconf-2-4 libnss3 libasound2 libxtst6 libxss1
67 # npm install -g grunt-cli
68 # npm install -g electron-prebuilt 66 # npm install -g electron-prebuilt
69 67
70 68
diff --git a/client/.gitignore b/client/.gitignore
index ec79762bb..548b53226 100644
--- a/client/.gitignore
+++ b/client/.gitignore
@@ -1,3 +1,5 @@
1typings 1typings
2app/**/*.js 2app/**/*.js
3app/**/*.map 3app/**/*.map
4stylesheets/index.css
5app/*.css
diff --git a/client/app/app.component.css b/client/app/app.component.css
deleted file mode 100644
index d627027e4..000000000
--- a/client/app/app.component.css
+++ /dev/null
@@ -1,3 +0,0 @@
1h1 {
2 font-size: 80px;
3}
diff --git a/client/app/app.component.html b/client/app/app.component.html
index 4bcdd569c..b6515528b 100644
--- a/client/app/app.component.html
+++ b/client/app/app.component.html
@@ -1 +1 @@
<h1>My First Angular 2 App</h1> <h1>{{ title }}</h1>
diff --git a/client/app/app.component.scss b/client/app/app.component.scss
new file mode 100644
index 000000000..e7315a8e9
--- /dev/null
+++ b/client/app/app.component.scss
@@ -0,0 +1,3 @@
1h1 {
2 font-size: 100px;
3}
diff --git a/client/app/app.component.ts b/client/app/app.component.ts
index f0ea272af..c908663e9 100644
--- a/client/app/app.component.ts
+++ b/client/app/app.component.ts
@@ -5,4 +5,6 @@ import {Component} from 'angular2/core';
5 templateUrl: 'app/app.component.html', 5 templateUrl: 'app/app.component.html',
6 styleUrls: [ 'app/app.component.css' ] 6 styleUrls: [ 'app/app.component.css' ]
7}) 7})
8export class AppComponent { } 8export class AppComponent {
9 title = "coucou";
10}
diff --git a/client/index.html b/client/index.html
index 15ccedb74..7aa408181 100644
--- a/client/index.html
+++ b/client/index.html
@@ -2,7 +2,7 @@
2 <head> 2 <head>
3 <title>Angular 2 QuickStart</title> 3 <title>Angular 2 QuickStart</title>
4 <meta name="viewport" content="width=device-width, initial-scale=1"> 4 <meta name="viewport" content="width=device-width, initial-scale=1">
5 <link rel="stylesheet" href="styles.css"> 5 <link rel="stylesheet" href="/stylesheets/index.css">
6 6
7 <!-- 1. Load libraries --> 7 <!-- 1. Load libraries -->
8 <!-- IE required polyfills, in this exact order --> 8 <!-- IE required polyfills, in this exact order -->
diff --git a/client/package.json b/client/package.json
index 171c39edf..71f305914 100644
--- a/client/package.json
+++ b/client/package.json
@@ -21,17 +21,16 @@
21 "license": "ISC", 21 "license": "ISC",
22 "dependencies": { 22 "dependencies": {
23 "angular2": "2.0.0-beta.8", 23 "angular2": "2.0.0-beta.8",
24 "systemjs": "0.19.22", 24 "bootstrap-sass": "^3.3.6",
25 "es6-promise": "^3.0.2", 25 "es6-promise": "^3.0.2",
26 "es6-shim": "^0.33.3", 26 "es6-shim": "^0.33.3",
27 "reflect-metadata": "0.1.2", 27 "reflect-metadata": "0.1.2",
28 "rxjs": "5.0.0-beta.2", 28 "rxjs": "5.0.0-beta.2",
29 "systemjs": "0.19.22",
29 "zone.js": "0.5.15" 30 "zone.js": "0.5.15"
30 }, 31 },
31 "devDependencies": { 32 "devDependencies": {
32 "concurrently": "^2.0.0",
33 "lite-server": "^2.1.0",
34 "typescript": "^1.8.2", 33 "typescript": "^1.8.2",
35 "typings":"^0.6.8" 34 "typings": "^0.6.8"
36 } 35 }
37} 36}
diff --git a/package.json b/package.json
index abae4847d..d7e29e0c1 100644
--- a/package.json
+++ b/package.json
@@ -17,15 +17,29 @@
17 "url": "git://github.com/Chocobozzz/PeerTube.git" 17 "url": "git://github.com/Chocobozzz/PeerTube.git"
18 }, 18 },
19 "scripts": { 19 "scripts": {
20 "start": "grunt dev", 20 "build": "concurrently \"npm run client:sass\" \"npm run client:tsc\"",
21 "test": "grunt build && standard && mocha tests" 21 "client:clean": "concurrently \"npm run client:tsc:clean\" \"npm run client:sass:clean\"",
22 "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",
23 "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",
24 "client:sass:index:clean": "cd client && rm -f stylesheets/index.css",
25 "client:sass:app": "cd client && node-sass app/ --output app/",
26 "client:sass:app:watch": "cd client && node-sass -w app/ --output app/",
27 "client:sass:app:clean": "cd client && rm -f app/*.css",
28 "client:sass": "concurrently \"npm run client:sass:index\" \"npm run client:sass:app\"",
29 "client:sass:watch": "concurrently \"npm run client:sass:index:watch\" \"npm run client:sass:app:watch\"",
30 "client:sass:clean": "concurrently \"npm run client:sass:index:clean\" \"npm run client:sass:app:clean\"",
31 "client:tsc": "cd client && npm run tsc",
32 "client:tsc:watch": "cd client && npm run tsc:w",
33 "client:tsc:clean": "cd client && rm -f app/*.js app/*.js.map",
34 "dev": "concurrently \"npm run livereload\" \"npm run client:tsc:watch\" \"npm run client:sass:watch\" \"npm start\"",
35 "livereload": "livereload ./client",
36 "start": "node server",
37 "test": "standard && mocha tests"
22 }, 38 },
23 "dependencies": { 39 "dependencies": {
24 "async": "^1.2.1", 40 "async": "^1.2.1",
25 "bittorrent-tracker": "^7.0.0", 41 "bittorrent-tracker": "^7.0.0",
26 "blueimp-file-upload": "^9.10.1",
27 "body-parser": "^1.12.4", 42 "body-parser": "^1.12.4",
28 "bootstrap-sass": "^3.3.5",
29 "config": "^1.14.0", 43 "config": "^1.14.0",
30 "connect-livereload": "^0.5.3", 44 "connect-livereload": "^0.5.3",
31 "debug": "^2.2.0", 45 "debug": "^2.2.0",
@@ -33,19 +47,7 @@
33 "electron-spawn": "https://github.com/Chocobozzz/electron-spawn", 47 "electron-spawn": "https://github.com/Chocobozzz/electron-spawn",
34 "express": "^4.12.4", 48 "express": "^4.12.4",
35 "express-validator": "^2.11.0", 49 "express-validator": "^2.11.0",
36 "grunt": "^0.4.5",
37 "grunt-browserify": "^4.0.1",
38 "grunt-concurrent": "^2.1.0",
39 "grunt-contrib-clean": "^1.0.0",
40 "grunt-contrib-copy": "0.8.2",
41 "grunt-contrib-watch": "^0.6.1",
42 "grunt-express-server": "^0.5.1",
43 "grunt-newer": "^1.1.1",
44 "grunt-sass": "^1.1.0",
45 "jade": "^1.10.0",
46 "jquery": "^2.1.4", 50 "jquery": "^2.1.4",
47 "js-yaml": "^3.3.1",
48 "load-grunt-tasks": "^3.3.0",
49 "lodash-node": "^3.10.2", 51 "lodash-node": "^3.10.2",
50 "mkdirp": "^0.5.1", 52 "mkdirp": "^0.5.1",
51 "mongoose": "^4.0.5", 53 "mongoose": "^4.0.5",
@@ -56,7 +58,6 @@
56 "request": "^2.57.0", 58 "request": "^2.57.0",
57 "request-replay": "^1.0.2", 59 "request-replay": "^1.0.2",
58 "segfault-handler": "^1.0.0", 60 "segfault-handler": "^1.0.0",
59 "time-grunt": "^1.2.1",
60 "ursa": "^0.9.1", 61 "ursa": "^0.9.1",
61 "validator": "^5.0.0", 62 "validator": "^5.0.0",
62 "webtorrent": "^0.78.1", 63 "webtorrent": "^0.78.1",
@@ -66,6 +67,8 @@
66 "devDependencies": { 67 "devDependencies": {
67 "chai": "^3.3.0", 68 "chai": "^3.3.0",
68 "mocha": "^2.3.3", 69 "mocha": "^2.3.3",
70 "node-livereload": "^0.6.0",
71 "node-sass": "^3.4.2",
69 "standard": "^6.0.1", 72 "standard": "^6.0.1",
70 "supertest": "^1.1.0" 73 "supertest": "^1.1.0"
71 }, 74 },