From 58cbad1756273da73553c450835e0d5a97ba3a3e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 4 Jan 2019 13:56:33 +0300 Subject: [PATCH 1/2] Update to latest grunt-sass * Fixes https://github.com/loqui/im/issues/1263 --- Gruntfile.js | 3 +++ package.json | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 6856eafd..3874e861 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -220,6 +220,9 @@ module.exports = function(grunt) { } }, sass: { + options: { + implementation: require('node-sass') + }, compile: { files: { 'src/style/loqui/index.css' : 'src/style/loqui/index.scss' diff --git a/package.json b/package.json index 60ae33eb..81dff186 100755 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "build": "grunt", "jshint": "node_modules/jshint/bin/jshint -c .jshintrc --exclude-path .gitignore src/scripts/loqui", "jsdoc-init": "git clone -b gh-pages --single-branch https://github.com/loqui/im.git gh-pages", - "jsdoc-build" : "sh jsdoc/build.sh", + "jsdoc-build": "sh jsdoc/build.sh", "jsdoc-publish": "sh jsdoc/publish.sh" }, "pre-commit": [ @@ -32,14 +32,15 @@ "grunt-contrib-connect": "~0.11.2", "grunt-contrib-copy": "~0.8.1", "grunt-contrib-watch": "~0.6.1", + "grunt-debian-package": "~0.1.13", "grunt-execute": "~0.2.2", "grunt-node-webkit-builder": "~1.0.2", - "grunt-sass": "^1.0.0", + "grunt-sass": "^3.0.2", "grunt-sed": "^0.1.1", "ink-docstrap": "git://github.com/TitanNano/docstrap.git", "jsdom": "~6.5.1", "jshint": "^2.6.0", - "pre-commit": "^1.0.1", - "grunt-debian-package": "~0.1.13" + "node-sass": "^4.11.0", + "pre-commit": "^1.0.1" } } From bfbbd89208a566fa7888031d1d2c50835d11e6ae Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 6 Jan 2019 13:54:42 +0300 Subject: [PATCH 2/2] add Travis config --- .travis.yml | 6 ++++++ Gruntfile.js | 12 ++++++------ package.json | 24 ++++++++++++------------ renderersCompiler.js | 2 +- 4 files changed, 25 insertions(+), 19 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..fe9a6da0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "11" + - "10" + - "8" +script: npm run build diff --git a/Gruntfile.js b/Gruntfile.js index 3874e861..2ba1af0e 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -170,9 +170,9 @@ module.exports = function(grunt) { } } }, - execute: { + exec: { renderersCompiler: { - src: ['renderersCompiler.js'] + command: 'node renderersCompiler.js' } }, sed: { @@ -235,12 +235,12 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-compress'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-clean'); - grunt.loadNpmTasks('grunt-node-webkit-builder'); + grunt.loadNpmTasks('grunt-nw-builder'); grunt.loadNpmTasks('grunt-sass'); grunt.loadNpmTasks('grunt-sed'); - grunt.loadNpmTasks('grunt-execute'); - grunt.registerTask('default', ['clean:build', 'execute', 'sass', 'copy', 'sed', 'clean:css', 'compress']); - grunt.registerTask('with-desktop', ['clean', 'execute', 'sass', 'copy', 'sed', 'clean:css', 'compress', 'nwjs']); + grunt.loadNpmTasks('grunt-exec'); + grunt.registerTask('default', ['clean:build', 'exec', 'sass', 'copy', 'sed', 'clean:css', 'compress']); + grunt.registerTask('with-desktop', ['clean', 'exec', 'sass', 'copy', 'sed', 'clean:css', 'compress', 'nwjs']); grunt.registerTask('devel', ['connect', 'watch']); grunt.registerTask('docstrap', ['copy:importDocstrapTemplate', 'copy:importJsdocConfig', 'copy:logoToDocstrap']); }; diff --git a/package.json b/package.json index 81dff186..bdb081ee 100755 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/loqui/im" }, "license": { - "type": "AGPL" + "type": "AGPL-3.0-only" }, "scripts": { "build": "grunt", @@ -25,20 +25,20 @@ "jshint" ], "devDependencies": { - "grunt": "~0.4.1", - "grunt-cli": "0.1.13", - "grunt-contrib-clean": "~0.6.0", - "grunt-contrib-compress": "~0.13.0", - "grunt-contrib-connect": "~0.11.2", - "grunt-contrib-copy": "~0.8.1", - "grunt-contrib-watch": "~0.6.1", + "grunt": "^1.0.3", + "grunt-cli": "^1.3.2", + "grunt-contrib-clean": "~2.0.0", + "grunt-contrib-compress": "^1.4.3", + "grunt-contrib-connect": "~2.0.0", + "grunt-contrib-copy": "~1.0.0", + "grunt-contrib-watch": "~1.1.0", "grunt-debian-package": "~0.1.13", - "grunt-execute": "~0.2.2", - "grunt-node-webkit-builder": "~1.0.2", + "grunt-exec": "^3.0.0", + "grunt-nw-builder": "^3.1.0", "grunt-sass": "^3.0.2", - "grunt-sed": "^0.1.1", + "grunt-sed": "https://github.com/gruntjs-updater/grunt-sed.git#peerDep", "ink-docstrap": "git://github.com/TitanNano/docstrap.git", - "jsdom": "~6.5.1", + "jsdom": "~13.1.0", "jshint": "^2.6.0", "node-sass": "^4.11.0", "pre-commit": "^1.0.1" diff --git a/renderersCompiler.js b/renderersCompiler.js index cfd3eab4..4ee4be05 100755 --- a/renderersCompiler.js +++ b/renderersCompiler.js @@ -1,7 +1,7 @@ var fs = require('fs'); var jsdom = require('jsdom'); -jsdom.env('src/index.html', { +var dom = new jsdom.JSDOM('src/index.html', { scripts: ['scripts/meteor/blaze.js'], done: function (errors, window) { var renderers = '/* jshint -W069 */\nRenderers = {};';