]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
I'm fed up with Gruntfile
authorChocobozzz <florian.bigard@gmail.com>
Mon, 7 Mar 2016 17:01:56 +0000 (18:01 +0100)
committerChocobozzz <florian.bigard@gmail.com>
Mon, 7 Mar 2016 17:01:56 +0000 (18:01 +0100)
Gruntfile.js [deleted file]
README.md
client/.gitignore
client/app/app.component.css [deleted file]
client/app/app.component.html
client/app/app.component.scss [new file with mode: 0644]
client/app/app.component.ts
client/index.html
client/package.json
package.json

diff --git a/Gruntfile.js b/Gruntfile.js
deleted file mode 100644 (file)
index 15e7524..0000000
+++ /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'
-    )
-  })
-}
index 87117f5f4740db5b673151472bbbf19847066be6..0477f3485996a6e20eb99fa376157b7bb92c0274 100644 (file)
--- 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
 
 
index ec79762bb812f1f1fb27930ece3027db1337a7bf..548b53226d06e5e045ba803daabe60ebe6356939 100644 (file)
@@ -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 (file)
index d627027..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-h1 {
-  font-size: 80px;
-}
index 4bcdd569c29aae825863cf272ca8bd84b4265e2c..b6515528b8cc3e8a0fa3f99b0c1f3286657715a9 100644 (file)
@@ -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 (file)
index 0000000..e7315a8
--- /dev/null
@@ -0,0 +1,3 @@
+h1 {
+  font-size: 100px;
+}
index f0ea272af6178f280e09827c4f03d0d87898de0e..c908663e9672d6189e3917efb96af45f9e5f260e 100644 (file)
@@ -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";
+}
index 15ccedb7486c0f52e7bb7a24e642e0b8e68e3221..7aa40818197fc91ffdb38e8d412f440655ae04da 100644 (file)
@@ -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 -->
index 171c39edf1b006fe6f34658e718acaf1f9dc1ce1..71f3059142e0ae4d3f6af4fedd8749b2a3e5b804 100644 (file)
   "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"
   }
 }
index abae4847d8d8bf0688642ba09468c865bc954bf5..d7e29e0c171b8c95cb894e9e65fbf50a114f65af 100644 (file)
     "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",
     "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"
   },