mirror of
https://github.com/bobwen-dev/react-templates
synced 2025-04-12 00:56:39 +02:00
update dependencies
minor fixes
This commit is contained in:
parent
f086cd63ea
commit
a993f8b172
36
package.json
36
package.json
@ -31,43 +31,43 @@
|
|||||||
"homepage": "https://github.com/wix/react-templates",
|
"homepage": "https://github.com/wix/react-templates",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": "^1.1.3",
|
"chalk": "^1.1.3",
|
||||||
"cheerio": "^0.20.0",
|
"cheerio": "^0.22.0",
|
||||||
"css": "^2.2.1",
|
"css": "^2.2.1",
|
||||||
"escodegen": "^1.8.0",
|
"escodegen": "^1.8.1",
|
||||||
"esprima": "^2.7.1",
|
"esprima": "^3.0.0",
|
||||||
"lodash": "^4.11.1",
|
"lodash": "^4.16.2",
|
||||||
"normalize-html-whitespace": "^0.2.0",
|
"normalize-html-whitespace": "^0.2.0",
|
||||||
"optionator": "^0.8.0",
|
"optionator": "^0.8.2",
|
||||||
"text-table": "^0.2.0"
|
"text-table": "^0.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-cli": "^6.10.1",
|
"babel-cli": "^6.14.0",
|
||||||
"babel-core": "^6.10.4",
|
"babel-core": "^6.14.0",
|
||||||
"babel-loader": "^6.2.4",
|
"babel-loader": "^6.2.5",
|
||||||
"babel-preset-es2015": "^6.9.0",
|
"babel-preset-es2015": "^6.14.0",
|
||||||
"brace": "^0.8.0",
|
"brace": "^0.8.0",
|
||||||
"brfs": "^1.4.1",
|
"brfs": "^1.4.1",
|
||||||
"coveralls": "^2.11.9",
|
"coveralls": "^2.11.14",
|
||||||
"eslint": "^3.0.1",
|
"eslint": "^3.6.1",
|
||||||
"eslint-config-wix-editor": "^0.2.3",
|
"eslint-config-wix-editor": "^0.2.3",
|
||||||
"eslint-plugin-lodash": "^1.9.4",
|
"eslint-plugin-lodash": "^1.10.3",
|
||||||
"eslint-plugin-react": "^5.2.2",
|
"eslint-plugin-react": "^6.3.0",
|
||||||
"eslint-plugin-wix-editor": "^1.1.1",
|
"eslint-plugin-wix-editor": "^1.1.1",
|
||||||
"grunt": "1.0.1",
|
"grunt": "1.0.1",
|
||||||
"grunt-babel": "^6.0.0",
|
"grunt-babel": "^6.0.0",
|
||||||
"grunt-browserify": "5.0.0",
|
"grunt-browserify": "5.0.0",
|
||||||
"grunt-contrib-requirejs": "1.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-contrib-watch": "1.0.0",
|
||||||
"grunt-eslint": "19.0.0",
|
"grunt-eslint": "19.0.0",
|
||||||
"grunt-tape": "^0.1.0",
|
"grunt-tape": "^0.1.0",
|
||||||
"istanbul": "^0.4.4",
|
"istanbul": "^0.4.5",
|
||||||
"json-loader": "^0.5.4",
|
"json-loader": "^0.5.4",
|
||||||
"react": "^15.2.0",
|
"react": "^15.3.2",
|
||||||
"react-dom": "^15.2.0",
|
"react-dom": "^15.3.2",
|
||||||
"react-native": "^0.29.0",
|
"react-native": "^0.29.0",
|
||||||
"tape": "^4.6.0",
|
"tape": "^4.6.0",
|
||||||
"webpack": "^1.13.1"
|
"webpack": "^1.13.2"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"templates",
|
"templates",
|
||||||
|
@ -80,14 +80,15 @@ function handleSingleFile(currentOptions, filename) {
|
|||||||
* @returns {int} The exit code for the operation.
|
* @returns {int} The exit code for the operation.
|
||||||
*/
|
*/
|
||||||
function execute(args) {
|
function execute(args) {
|
||||||
let currentOptions;
|
|
||||||
try {
|
try {
|
||||||
currentOptions = options.parse(args);
|
const currentOptions = options.parse(args);
|
||||||
|
console.log(JSON.stringify(currentOptions));
|
||||||
|
|
||||||
|
return executeOptions(currentOptions);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error.message);
|
console.error(error.message);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return executeOptions(currentOptions);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -231,7 +231,7 @@ function handleStyleProp(val, node, context) {
|
|||||||
.map(i => {
|
.map(i => {
|
||||||
const pair = i.split(':');
|
const pair = i.split(':');
|
||||||
const key = pair[0].trim();
|
const key = pair[0].trim();
|
||||||
if (/\{|\}/g.test(key)) {
|
if (/\{|}/g.test(key)) {
|
||||||
throw RTCodeError.build(context, node, 'style attribute keys cannot contain { } expressions');
|
throw RTCodeError.build(context, node, 'style attribute keys cannot contain { } expressions');
|
||||||
}
|
}
|
||||||
const value = pair.slice(1).join(':').trim();
|
const value = pair.slice(1).join(':').trim();
|
||||||
@ -257,7 +257,7 @@ function convertTagNameToConstructor(tagName, context) {
|
|||||||
isHtmlTag = isHtmlTag || tagName.match(/^\w+(-\w+)$/);
|
isHtmlTag = isHtmlTag || tagName.match(/^\w+(-\w+)$/);
|
||||||
return isHtmlTag ? `'${tagName}'` : tagName;
|
return isHtmlTag ? `'${tagName}'` : tagName;
|
||||||
}
|
}
|
||||||
return isHtmlTag ? 'React.DOM.' + tagName : tagName;
|
return isHtmlTag ? `React.DOM.${tagName}` : tagName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,16 +45,16 @@ module.exports = {
|
|||||||
let code = '';
|
let code = '';
|
||||||
try {
|
try {
|
||||||
const html = fs.readFileSync(filename).toString();
|
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, '');
|
code = reactTemplates.convertTemplateToReact(html, options).replace(/\r/g, '');
|
||||||
const actual = testUtils.normalizeHtml(testUtils.codeToHtml(code));
|
const actual = testUtils.normalizeHtml(testUtils.codeToHtml(code));
|
||||||
const equal = compareAndWriteHtml(t, actual, expected, filename);
|
const equal = compareAndWriteHtml(t, actual, expected, filename);
|
||||||
if (!equal) {
|
if (!equal) {
|
||||||
fs.writeFileSync(filename + '.code.js', code);
|
fs.writeFileSync(`${filename}.code.js`, code);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(testFile, e);
|
console.log(testFile, e);
|
||||||
fs.writeFileSync(filename + '.code.js', code);
|
fs.writeFileSync(`${filename}.code.js`, code);
|
||||||
t.fail(e);
|
t.fail(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -28,7 +28,7 @@ function normalizeHtml(html) {
|
|||||||
function compareAndWrite(t, actual, expected, filename) {
|
function compareAndWrite(t, actual, expected, filename) {
|
||||||
t.equal(actual, expected, filename);
|
t.equal(actual, expected, filename);
|
||||||
if (actual !== expected) {
|
if (actual !== expected) {
|
||||||
fs.writeFileSync(filename + '.actual.js', actual);
|
fs.writeFileSync(`${filename}.actual.js`, actual);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user