Skip to content

Commit 589700b

Browse files
committed
feat: initial commit
0 parents  commit 589700b

File tree

429 files changed

+31688
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

429 files changed

+31688
-0
lines changed

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
charset = utf-8
7+
trim_trailing_whitespace = false
8+
insert_final_newline = false

.github/workflows/release.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
build:
8+
runs-on: ubuntu-16.04
9+
strategy:
10+
matrix:
11+
node: ["10"]
12+
name: Node ${{ matrix.node }}
13+
steps:
14+
- name: GIT - checkout
15+
uses: actions/checkout@v1
16+
with:
17+
ref: master
18+
19+
- name: GIT - prepare
20+
run: |
21+
git checkout "${GITHUB_REF:11}"
22+
git remote set-url origin https://lokesh-coder:${{ secrets.GITHUB_TOKEN }}@github.com/lokesh-coder/lesyjs.git
23+
git config --global user.email "[email protected]"
24+
git config --global user.name "lokesh-coder"
25+
26+
- name: NODE - setup
27+
uses: actions/setup-node@v1
28+
with:
29+
node-version: ${{ matrix.node }}
30+
31+
- name: NPM - install lerna
32+
run: npm install --global lerna
33+
34+
- name: LERNA - bootstrap
35+
run: npm run bootstrap
36+
37+
- name: NPM - lint
38+
run: npm run lint
39+
40+
- name: NPM - test
41+
run: npm test
42+
43+
- name: LERNA - build packages
44+
run: npm run build
45+
env:
46+
GH_TOKEN: ${{ secrets.DOC_README_FETCH }}
47+
48+
- name: LERNA - bump version
49+
run: npm run bump
50+
env:
51+
GH_TOKEN: ${{ secrets.DOC_README_FETCH }}
52+
53+
- name: GIT - remove changed files
54+
run: git reset --hard
55+
56+
- name: BASH - set local registry
57+
run: echo //registry.npmjs.org/:_authToken=$NPM_TOKEN > ~/.npmrc
58+
env:
59+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
60+
61+
- name: LERNA - release packages
62+
run: npm run publish
63+
64+
- name: DOCS
65+
uses: peaceiris/actions-gh-pages@v3
66+
with:
67+
github_token: ${{ secrets.DOC_README_FETCH }}
68+
publish_dir: ./docs/public

.github/workflows/test.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Test
2+
on:
3+
push:
4+
branches-ignore:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
jobs:
10+
build:
11+
runs-on: ubuntu-16.04
12+
strategy:
13+
matrix:
14+
node: ["10"]
15+
name: Node ${{ matrix.node }}
16+
steps:
17+
- name: GIT - checkout
18+
uses: actions/checkout@v1
19+
with:
20+
ref: master
21+
22+
- name: GIT - prepare
23+
run: |
24+
git checkout "${GITHUB_REF:11}"
25+
git remote set-url origin https://lokesh-coder:${{ secrets.GITHUB_TOKEN }}@github.com/lokesh-coder/lesyjs.git
26+
git config --global user.email "[email protected]"
27+
git config --global user.name "lokesh-coder"
28+
29+
- name: NODE - setup
30+
uses: actions/setup-node@v1
31+
with:
32+
node-version: ${{ matrix.node }}
33+
34+
- name: NPM - install lerna
35+
run: npm install --global lerna
36+
37+
- name: LERNA - bootstrap
38+
run: npm run bootstrap
39+
40+
- name: NPM - lint
41+
run: npm run lint
42+
43+
- name: NPM - test
44+
run: npm test

.gitignore

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# TypeScript v1 declaration files
45+
typings/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Optional REPL history
57+
.node_repl_history
58+
59+
# Output of 'npm pack'
60+
*.tgz
61+
62+
# Yarn Integrity file
63+
.yarn-integrity
64+
65+
# dotenv environment variables file
66+
.env
67+
.env.test
68+
69+
# parcel-bundler cache (https://parceljs.org/)
70+
.cache
71+
72+
# next.js build output
73+
.next
74+
75+
# nuxt.js build output
76+
.nuxt
77+
78+
# vuepress build output
79+
.vuepress/dist
80+
81+
# Serverless directories
82+
.serverless/
83+
84+
# FuseBox cache
85+
.fusebox/
86+
87+
# DynamoDB Local files
88+
.dynamodb/
89+
90+
# vscode
91+
.history
92+
.clinic
93+
dist/
94+
.DS_Store
95+
docs/public
96+
packages/plugins/lesy-plugin-pilot/public
97+
.todo

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"trailingComma": "all",
3+
"tabWidth": 2,
4+
"semi": true,
5+
"singleQuote": false
6+
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Lesy

benchmark/benchmark.suite.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const b = require("benny");
2+
const commander = require("commander");
3+
const yargs = require("yargs");
4+
const { build: gluegun } = require("gluegun");
5+
const lesy = require("@lesy/compiler");
6+
const { commanderCode, gluegunCode, yargsCode, lesyCode } = require("./libs");
7+
8+
b.suite(
9+
"Performance test",
10+
11+
b.add("commander", () => {
12+
commanderCode(commander);
13+
}),
14+
15+
b.add("yargs", () => {
16+
yargsCode(yargs);
17+
}),
18+
19+
b.add("glugun", async () => {
20+
await gluegunCode(gluegun);
21+
}),
22+
23+
b.add("lesy", async () => {
24+
await lesyCode(lesy);
25+
}),
26+
27+
b.cycle(),
28+
b.complete(),
29+
b.save({ file: "perf", version: "1.0.0", folder: "./results" }),
30+
b.save({ file: "perf", format: "chart.html", folder: "./results" })
31+
);

benchmark/libs/commander.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = program => {
2+
program.command("greet").action(function() {
3+
console.log("commander: Hello world");
4+
});
5+
6+
program.parse(["./", "./", "greet"]);
7+
};

benchmark/libs/gluegun.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = async greet => {
2+
const movieCLI = greet("greetings")
3+
.command({
4+
name: "greet",
5+
run: () => console.log("gluegun: hello world"),
6+
})
7+
.src(__dirname)
8+
.exclude([
9+
"meta",
10+
"strings",
11+
"print",
12+
"filesystem",
13+
"semver",
14+
"system",
15+
"prompt",
16+
"http",
17+
"template",
18+
"patching",
19+
])
20+
.create();
21+
22+
await movieCLI.run(["greet"]);
23+
};

benchmark/libs/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const commanderCode = require("./commander");
2+
const yargsCode = require("./yargs");
3+
const gluegunCode = require("./gluegun");
4+
const lesyCode = require("./lesy");
5+
6+
module.exports = { commanderCode, yargsCode, gluegunCode, lesyCode };

0 commit comments

Comments
 (0)