mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-08-10 18:54:23 +02:00
make sure the right files are ignored. and not ignored
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -3,3 +3,6 @@ data
|
||||
locales
|
||||
images/latex/source
|
||||
component/section/**/index.js
|
||||
!component/section/index.js
|
||||
.buildmark
|
||||
npm-debug.log
|
||||
|
59
components/sections/index.js
Normal file
59
components/sections/index.js
Normal file
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* This is an ordered list of all sections for the article
|
||||
* @type {Object}
|
||||
*/
|
||||
module.exports = {
|
||||
preface: require("./preface"),
|
||||
introduction: require("./introduction"),
|
||||
whatis: require("./whatis"),
|
||||
explanation: require("./explanation"),
|
||||
control: require("./control"),
|
||||
extended: require("./extended"),
|
||||
|
||||
matrix: require("./matrix"),
|
||||
decasteljau: require("./decasteljau"),
|
||||
flattening: require("./flattening"),
|
||||
splitting: require("./splitting"),
|
||||
matrixsplit: require("./matrixsplit"),
|
||||
reordering: require("./reordering"),
|
||||
|
||||
derivatives: require("./derivatives"),
|
||||
pointvectors: require("./pointvectors"),
|
||||
components: require("./components"),
|
||||
extremities: require("./extremities"),
|
||||
boundingbox: require("./boundingbox"),
|
||||
aligning: require("./aligning"),
|
||||
tightbounds: require("./tightbounds"),
|
||||
inflections: require("./inflections"),
|
||||
canonical: require("./canonical"),
|
||||
|
||||
arclength: require("./arclength"),
|
||||
arclengthapprox: require("./arclengthapprox"),
|
||||
tracing: require("./tracing"),
|
||||
|
||||
intersections: require("./intersections"),
|
||||
curveintersection: require("./curveintersection"),
|
||||
|
||||
abc: require("./abc"),
|
||||
moulding: require("./moulding"),
|
||||
pointcurves: require("./pointcurves"),
|
||||
|
||||
catmullconv: require("./catmullconv"),
|
||||
catmullmoulding: require("./catmullmoulding"),
|
||||
|
||||
polybezier: require("./polybezier"),
|
||||
|
||||
shapes: require("./shapes"),
|
||||
|
||||
projections: require("./projections"),
|
||||
offsetting: require("./offsetting"),
|
||||
graduatedoffset: require("./graduatedoffset"),
|
||||
|
||||
circles: require("./circles"),
|
||||
circles_cubic: require("./circles_cubic"),
|
||||
arcapproximation: require("./arcapproximation"),
|
||||
|
||||
bsplines: require("./bsplines"),
|
||||
|
||||
comments: require("./comments")
|
||||
};
|
11
package.json
11
package.json
@@ -3,18 +3,19 @@
|
||||
"version": "2.0.0",
|
||||
"description": "pomax.github.io/bezierinfo",
|
||||
"scripts": {
|
||||
"bootstrap": "run-s makeindex localize",
|
||||
"localize": "node tools/make-locales",
|
||||
"prebuild": "node tools/buildmark -- set",
|
||||
"build": "run-s localize less makeindex build:** default",
|
||||
"build": "run-s bootstrap less build:** default",
|
||||
"default": "node tools/copy-default-locale",
|
||||
"postbuild": "node tools/buildmark -- resolve",
|
||||
"makeindex": "node tools/form-section-index-files.js",
|
||||
"makeindex": "node tools/form-section-index-files",
|
||||
"build:en-GB": "webpack -p",
|
||||
"build:zh-CN": "cross-env LOCALE=zh-CN webpack -p",
|
||||
"build:ja-JP": "cross-env LOCALE=ja-JP webpack -p",
|
||||
"dev": "npm run localize && npm run less && webpack-dev-server --progress --colors --hot --inline",
|
||||
"dev:zh-CN": "npm run localize && npm run less && cross-env LOCALE=zh-CN webpack-dev-server --progress --colors --hot --inline",
|
||||
"dev:ja-JP": "npm run localize && npm run less && cross-env LOCALE=ja-JP webpack-dev-server --progress --colors --hot --inline",
|
||||
"dev": "npm run bootstrap && npm run less && webpack-dev-server --progress --colors --hot --inline",
|
||||
"dev:zh-CN": "npm run bootstrap && npm run less && cross-env LOCALE=zh-CN webpack-dev-server --progress --colors --hot --inline",
|
||||
"dev:ja-JP": "npm run bootstrap && npm run less && cross-env LOCALE=ja-JP webpack-dev-server --progress --colors --hot --inline",
|
||||
"latex": "node tools/tex-to-svg",
|
||||
"less": "lessc stylesheets/style.less > stylesheets/style.base.css && csso stylesheets/style.base.css > stylesheets/style.css",
|
||||
"singles": "npm run dev -- --singles",
|
||||
|
@@ -14,11 +14,15 @@ var jsxshim = require("./lib/jsx-shim");
|
||||
const BASEDIR = path.join(__dirname, "..");
|
||||
|
||||
var index = require(path.join(BASEDIR, "components/sections"));
|
||||
console.log(index);
|
||||
|
||||
var handlers = [];
|
||||
Object.keys(index).forEach( section => {
|
||||
var handlerFile = path.join(BASEDIR, `components/sections/${section}/handler.js`);
|
||||
|
||||
var hasHandler = false;
|
||||
var withKeys = false;
|
||||
|
||||
if (fs.existsSync(handlerFile)) {
|
||||
hasHandler = true;
|
||||
let content = fs.readFileSync(handlerFile).toString();
|
||||
@@ -38,5 +42,6 @@ Object.keys(index).forEach( section => {
|
||||
`module.exports = generateBase("${section}");`
|
||||
].filter(l => !!l).join('\n');
|
||||
|
||||
console.log(`writing ${section}`);
|
||||
fs.writeFileSync(path.join(BASEDIR,`components/sections/${section}/index.js`), indexCode);
|
||||
});
|
||||
|
Reference in New Issue
Block a user