+++ /dev/null
-'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'
- )
- })
-}
"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",
"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",
"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"
},