Skip to content

Commit 0d2d099

Browse files
committed
Change helper file name to p5-keywords.js
1 parent 041a5b3 commit 0d2d099

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

client/utils/p5-javascript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Distributed under an MIT license: https://codemirror.net/LICENSE
33

44
/*eslint-disable*/
5-
var p5_javascript_template = require("./p5-javascript-template");
5+
var p5_javascript_template = require("./p5-keywords");
66
var p5FunctionKeywords = p5_javascript_template.p5FunctionKeywords;
77
var p5VariableKeywords = p5_javascript_template.p5VariableKeywords;
88

client/utils/p5-javascript-template.js renamed to client/utils/p5-keywords.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/scripts/update-syntax-highlighting.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ request('https://p5js.org/reference/data.json', (err, res) => {
2727
p5VariablePart = p5VariablePart.replace(/"p5Variable"/g, 'p5Variable');
2828
p5FunctionPart = p5FunctionPart.replace(/"p5Function"/g, 'p5Function');
2929

30-
let generatedCode = '/*eslint-disable*/ \n';
31-
generatedCode += '/*helper file for syntax highlighting generated by update-syntax-highlighting script*/ \n';
30+
let generatedCode = '/* eslint-disable */ \n';
31+
generatedCode += '/* generated: do not edit! helper file for syntax highlighting. generated by update-syntax-highlighting script */ \n';
3232
generatedCode += 'var p5Function = {type: "variable", style: "p5-function"};\n';
3333
generatedCode += 'var p5Variable = {type: "variable", style: "p5-variable"};\n';
3434
generatedCode += `let p5VariableKeywords = ${p5VariablePart}; \n`;
3535
generatedCode += `let p5FunctionKeywords = ${p5FunctionPart}; \n`;
3636
generatedCode += 'exports.p5FunctionKeywords = p5FunctionKeywords;\n';
3737
generatedCode += 'exports.p5VariableKeywords = p5VariableKeywords;\n';
38-
fs.writeFile(`${process.cwd()}/client/utils/p5-javascript-template.js`, generatedCode, (error) => {
38+
fs.writeFile(`${process.cwd()}/client/utils/p5-keywords.js`, generatedCode, (error) => {
3939
if (error) {
4040
console.log("Error!! Couldn't write to the file", error);
4141
} else {

0 commit comments

Comments
 (0)