diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 15e75247e..000000000 --- a/Gruntfile.js +++ /dev/null @@ -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' - ) - }) -} 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 ### 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 diff --git a/client/.gitignore b/client/.gitignore index ec79762bb..548b53226 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -1,3 +1,5 @@ typings app/**/*.js app/**/*.map +stylesheets/index.css +app/*.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 @@ -h1 { - font-size: 80px; -} 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 @@ -

My First Angular 2 App

+

{{ title }}

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 @@ +h1 { + font-size: 100px; +} 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'; templateUrl: 'app/app.component.html', styleUrls: [ 'app/app.component.css' ] }) -export class AppComponent { } +export class AppComponent { + title = "coucou"; +} 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 @@ Angular 2 QuickStart - + 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 @@ "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" } } diff --git a/package.json b/package.json index abae4847d..d7e29e0c1 100644 --- a/package.json +++ b/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" },