diff --git a/.gitignore b/.gitignore index 1362660..0a63732 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ npm-debug.log /web /target /coverage +/.nyc_output ### Test Output ### test/data/**/*.rt.actual.js diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 2e1c1bc..0000000 --- a/.npmignore +++ /dev/null @@ -1,25 +0,0 @@ - -### Operating systems ### -.DS_Store -.AppleDouble -.LSOverride -._* -.Spotlight-V100 -.Trashes - -### Regular dev ### -node_modules -npm-debug.log -.idea -*.iml - -### bower ### -/bower_components/* - -### tests ### -/test - -### gh-pages content ### -/index.html -/playground -/web diff --git a/package.json b/package.json index 9292ed1..0601290 100644 --- a/package.json +++ b/package.json @@ -29,47 +29,50 @@ "bugs": { "url": "https://github.com/wix/react-templates/issues" }, + "files": [ + "dist", "bin" + ], "homepage": "https://github.com/wix/react-templates", "dependencies": { - "chalk": "2.3.0", - "cheerio": "0.22.0", - "css": "2.2.2", - "escodegen": "1.9.0", - "esprima": "4.0.0", - "glob": "7.1.2", - "lodash": "4.17.5", - "normalize-html-whitespace": "0.2.0", - "nyc": "^11.4.1", - "optionator": "0.8.2", - "text-table": "0.2.0" + "chalk": "^2.4.1", + "cheerio": "^0.22.0", + "css": "^2.2.3", + "escodegen": "^1.9.1", + "esprima": "^4.0.0", + "glob": "^7.1.2", + "lodash": "^4.17.10", + "normalize-html-whitespace": "^0.2.0", + "nyc": "^11.7.1", + "optionator": "^0.8.2", + "text-table": "^0.2.0" }, "devDependencies": { - "babel-cli": "6.26.0", - "babel-core": "6.26.0", - "babel-loader": "7.1.2", - "babel-preset-es2015": "6.24.1", - "brace": "0.10.0", - "brfs": "1.4.3", - "coveralls": "3.0.0", - "eslint": "4.11.0", - "eslint-config-wix-editor": "0.5.1", - "eslint-plugin-lodash": "2.5.0", - "eslint-plugin-react": "7.4.0", - "eslint-plugin-wix-editor": "1.1.1", - "grunt": "1.0.1", - "grunt-babel": "7.0.0", - "grunt-browserify": "5.2.0", - "grunt-contrib-requirejs": "1.0.0", - "grunt-contrib-uglify": "3.1.0", - "grunt-contrib-watch": "1.0.0", - "grunt-eslint": "20.1.0", - "istanbul": "0.4.5", - "json-loader": "0.5.7", - "mocha": "4.0.1", + "babel-cli": "^6.26.0", + "babel-core": "^6.26.3", + "babel-loader": "^7.1.4", + "babel-preset-es2015": "^6.24.1", + "brace": "^0.11.1", + "brfs": "^1.6.1", + "coveralls": "^3.0.1", + "eslint": "^4.19.1", + "eslint-config-wix-editor": "^2.1.0", + "eslint-plugin-lodash": "^2.7.0", + "eslint-plugin-react": "^7.7.0", + "eslint-plugin-wix-editor": "^1.1.1", + "grunt": "^1.0.2", + "grunt-babel": "^7.0.0", + "grunt-browserify": "5.3.0", + "grunt-contrib-requirejs": "^1.0.0", + "grunt-contrib-uglify": "^3.3.0", + "grunt-contrib-watch": "1.0.1", + "grunt-eslint": "^20.1.0", + "istanbul": "^0.4.5", + "json-loader": "^0.5.7", + "mocha": "^5.1.1", "react": "15.3.2", "react-dom": "15.3.2", "react-native": "0.45.1", - "webpack": "3.8.1" + "webpack": "^4.7.0" }, "keywords": [ "templates", diff --git a/src/cli.js b/src/cli.js index 61f773a..2a18df6 100755 --- a/src/cli.js +++ b/src/cli.js @@ -75,7 +75,7 @@ function handleSingleFile(currentOptions, filename) { outputFilename = filename.replace(/\.jsrt$/, '.js') currentOptions = _.assign({}, currentOptions, {modules: 'jsrt'}) } else if (sourceExt === '.rts') { - outputFilename = filename + '.js' + outputFilename = `${filename}.js` currentOptions = _.assign({}, currentOptions, {modules: 'rts'}) } else { context.error('invalid file, only handle rt/jsrt files', filename) diff --git a/src/formatters/stylish.js b/src/formatters/stylish.js index c3b1aaa..6463725 100644 --- a/src/formatters/stylish.js +++ b/src/formatters/stylish.js @@ -13,7 +13,7 @@ const table = require('text-table') * @returns {string} The original word with an s on the end if count is not one. */ function pluralize(word, count) { - return count === 1 ? word : word + 's' + return count === 1 ? word : `${word}s` } /** * @param {number} line