update dependencies

minor fixes
This commit is contained in:
ido 2016-09-28 18:16:17 +03:00
parent f086cd63ea
commit a993f8b172
5 changed files with 28 additions and 27 deletions

View File

@ -31,43 +31,43 @@
"homepage": "https://github.com/wix/react-templates",
"dependencies": {
"chalk": "^1.1.3",
"cheerio": "^0.20.0",
"cheerio": "^0.22.0",
"css": "^2.2.1",
"escodegen": "^1.8.0",
"esprima": "^2.7.1",
"lodash": "^4.11.1",
"escodegen": "^1.8.1",
"esprima": "^3.0.0",
"lodash": "^4.16.2",
"normalize-html-whitespace": "^0.2.0",
"optionator": "^0.8.0",
"optionator": "^0.8.2",
"text-table": "^0.2.0"
},
"devDependencies": {
"babel-cli": "^6.10.1",
"babel-core": "^6.10.4",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.9.0",
"babel-cli": "^6.14.0",
"babel-core": "^6.14.0",
"babel-loader": "^6.2.5",
"babel-preset-es2015": "^6.14.0",
"brace": "^0.8.0",
"brfs": "^1.4.1",
"coveralls": "^2.11.9",
"eslint": "^3.0.1",
"coveralls": "^2.11.14",
"eslint": "^3.6.1",
"eslint-config-wix-editor": "^0.2.3",
"eslint-plugin-lodash": "^1.9.4",
"eslint-plugin-react": "^5.2.2",
"eslint-plugin-lodash": "^1.10.3",
"eslint-plugin-react": "^6.3.0",
"eslint-plugin-wix-editor": "^1.1.1",
"grunt": "1.0.1",
"grunt-babel": "^6.0.0",
"grunt-browserify": "5.0.0",
"grunt-contrib-requirejs": "1.0.0",
"grunt-contrib-uglify": "1.0.1",
"grunt-contrib-uglify": "^2.0.0",
"grunt-contrib-watch": "1.0.0",
"grunt-eslint": "19.0.0",
"grunt-tape": "^0.1.0",
"istanbul": "^0.4.4",
"istanbul": "^0.4.5",
"json-loader": "^0.5.4",
"react": "^15.2.0",
"react-dom": "^15.2.0",
"react": "^15.3.2",
"react-dom": "^15.3.2",
"react-native": "^0.29.0",
"tape": "^4.6.0",
"webpack": "^1.13.1"
"webpack": "^1.13.2"
},
"keywords": [
"templates",

View File

@ -80,14 +80,15 @@ function handleSingleFile(currentOptions, filename) {
* @returns {int} The exit code for the operation.
*/
function execute(args) {
let currentOptions;
try {
currentOptions = options.parse(args);
const currentOptions = options.parse(args);
console.log(JSON.stringify(currentOptions));
return executeOptions(currentOptions);
} catch (error) {
console.error(error.message);
return 1;
}
return executeOptions(currentOptions);
}
module.exports = {

View File

@ -231,7 +231,7 @@ function handleStyleProp(val, node, context) {
.map(i => {
const pair = i.split(':');
const key = pair[0].trim();
if (/\{|\}/g.test(key)) {
if (/\{|}/g.test(key)) {
throw RTCodeError.build(context, node, 'style attribute keys cannot contain { } expressions');
}
const value = pair.slice(1).join(':').trim();
@ -257,7 +257,7 @@ function convertTagNameToConstructor(tagName, context) {
isHtmlTag = isHtmlTag || tagName.match(/^\w+(-\w+)$/);
return isHtmlTag ? `'${tagName}'` : tagName;
}
return isHtmlTag ? 'React.DOM.' + tagName : tagName;
return isHtmlTag ? `React.DOM.${tagName}` : tagName;
}
/**

View File

@ -45,16 +45,16 @@ module.exports = {
let code = '';
try {
const html = fs.readFileSync(filename).toString();
const expected = testUtils.normalizeHtml(readFileNormalized(filename + '.html'));
const expected = testUtils.normalizeHtml(readFileNormalized(`${filename}.html`));
code = reactTemplates.convertTemplateToReact(html, options).replace(/\r/g, '');
const actual = testUtils.normalizeHtml(testUtils.codeToHtml(code));
const equal = compareAndWriteHtml(t, actual, expected, filename);
if (!equal) {
fs.writeFileSync(filename + '.code.js', code);
fs.writeFileSync(`${filename}.code.js`, code);
}
} catch (e) {
console.log(testFile, e);
fs.writeFileSync(filename + '.code.js', code);
fs.writeFileSync(`${filename}.code.js`, code);
t.fail(e);
}
});

View File

@ -28,7 +28,7 @@ function normalizeHtml(html) {
function compareAndWrite(t, actual, expected, filename) {
t.equal(actual, expected, filename);
if (actual !== expected) {
fs.writeFileSync(filename + '.actual.js', actual);
fs.writeFileSync(`${filename}.actual.js`, actual);
return false;
}
return true;