mirror of
https://activitypub.software/TransFem-org/sfm-js
synced 2024-11-21 21:55:09 +00:00
🐱
This commit is contained in:
parent
303ba2827a
commit
8884fde58b
7 changed files with 15 additions and 9 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,4 +1,6 @@
|
|||
node_modules
|
||||
built
|
||||
package-lock.json
|
||||
|
||||
temp
|
||||
syuilo-parser*
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
"scripts": {
|
||||
"build": "npm run peg && npm run tsc && npm run webpack",
|
||||
"build-dev": "npm run peg-dev && npm run tsc && npm run webpack-dev",
|
||||
"peg": "mkdirp ./built/parser && pegjs -o built/parser/coreParser.js src/parser/coreParser.pegjs",
|
||||
"peg-dev": "mkdirp ./built/parser && pegjs -o built/parser/coreParser.js --trace src/parser/coreParser.pegjs",
|
||||
"peg": "mkdirp ./built/parser && pegjs -o built/parser/core-parser.js src/parser/core-parser.pegjs",
|
||||
"peg-dev": "mkdirp ./built/parser && pegjs -o built/parser/core-parser.js --trace src/parser/core-parser.pegjs",
|
||||
"tsc": "tsc",
|
||||
"webpack": "webpack --mode=production",
|
||||
"webpack-dev": "webpack --mode=development",
|
||||
|
@ -26,5 +26,9 @@
|
|||
"typescript": "3.7.x",
|
||||
"webpack": "4.40.x",
|
||||
"webpack-cli": "3.3.x"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/parsimmon": "^1.10.1",
|
||||
"parsimmon": "^1.13.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { PegParser } from '../parser/pegParser';
|
||||
import { PegParser } from '../parser/peg-parser';
|
||||
|
||||
async function entryPoint() {
|
||||
const coreParser: PegParser = require('../../built/parser/coreParser.js');
|
||||
const coreParser: PegParser = require('../../built/parser/core-parser.js');
|
||||
|
||||
const input = '[hoge]';
|
||||
console.log('parsing input:', input);
|
||||
const result = coreParser.parse(input);
|
||||
console.log('parsing result:');
|
||||
console.log(result);
|
||||
console.log(JSON.stringify(result));
|
||||
}
|
||||
entryPoint()
|
||||
.catch(err => console.log(err));
|
|
@ -1,8 +1,8 @@
|
|||
import { PegParser } from './parser/pegParser';
|
||||
import { PegParser } from './parser/peg-parser';
|
||||
|
||||
const coreParser: PegParser = require('./parser/coreParser');
|
||||
const coreParser: PegParser = require('./parser/core-parser');
|
||||
const input = '[hoge]';
|
||||
console.log('parsing input:', input);
|
||||
const result = coreParser.parse(input);
|
||||
console.log('parsing result:');
|
||||
console.log(result);
|
||||
console.log(JSON.stringify(result));
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
entry: './src/client/mainEntry.ts',
|
||||
entry: './src/client/main-entry.ts',
|
||||
output: {
|
||||
path: `${__dirname}/built/client`,
|
||||
publicPath: '/', // base path of URL
|
||||
|
|
Loading…
Reference in a new issue