Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c19486e

Browse files
🔨 a little bit of clean up & license change
1 parent bc35070 commit c19486e

File tree

4 files changed

+1096
-24
lines changed

4 files changed

+1096
-24
lines changed

‎.gitignore

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Created by https://www.gitignore.io/api/macos,javascript,node
2+
# Edit at https://www.gitignore.io/?templates=macos,javascript,node
3+
4+
#!! ERROR: javascript is undefined. Use list command to see defined gitignore types !!#
5+
6+
### macOS ###
7+
# General
8+
.DS_Store
9+
.AppleDouble
10+
.LSOverride
11+
12+
# Icon must end with two \r
13+
Icon
14+
15+
# Thumbnails
16+
._*
17+
18+
# Files that might appear in the root of a volume
19+
.DocumentRevisions-V100
20+
.fseventsd
21+
.Spotlight-V100
22+
.TemporaryItems
23+
.Trashes
24+
.VolumeIcon.icns
25+
.com.apple.timemachine.donotpresent
26+
27+
# Directories potentially created on remote AFP share
28+
.AppleDB
29+
.AppleDesktop
30+
Network Trash Folder
31+
Temporary Items
32+
.apdisk
33+
34+
### Node ###
35+
# Logs
36+
logs
37+
*.log
38+
npm-debug.log*
39+
yarn-debug.log*
40+
yarn-error.log*
41+
42+
# Runtime data
43+
pids
44+
*.pid
45+
*.seed
46+
*.pid.lock
47+
48+
# Directory for instrumented libs generated by jscoverage/JSCover
49+
lib-cov
50+
51+
# Coverage directory used by tools like istanbul
52+
coverage
53+
54+
# nyc test coverage
55+
.nyc_output
56+
57+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
58+
.grunt
59+
60+
# Bower dependency directory (https://bower.io/)
61+
bower_components
62+
63+
# node-waf configuration
64+
.lock-wscript
65+
66+
# Compiled binary addons (https://nodejs.org/api/addons.html)
67+
build/Release
68+
69+
# Dependency directories
70+
node_modules/
71+
jspm_packages/
72+
73+
# TypeScript v1 declaration files
74+
typings/
75+
76+
# Optional npm cache directory
77+
.npm
78+
79+
# Optional eslint cache
80+
.eslintcache
81+
82+
# Optional REPL history
83+
.node_repl_history
84+
85+
# Output of 'npm pack'
86+
*.tgz
87+
88+
# Yarn Integrity file
89+
.yarn-integrity
90+
91+
# dotenv environment variables file
92+
.env
93+
.env.test
94+
95+
# parcel-bundler cache (https://parceljs.org/)
96+
.cache
97+
98+
# next.js build output
99+
.next
100+
101+
# nuxt.js build output
102+
.nuxt
103+
104+
# vuepress build output
105+
.vuepress/dist
106+
107+
# Serverless directories
108+
.serverless/
109+
110+
# FuseBox cache
111+
.fusebox/
112+
113+
# DynamoDB Local files
114+
.dynamodb/
115+
116+
# End of https://www.gitignore.io/api/macos,javascript,node

‎generator/index.js

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,35 @@
1-
let ui5 = `\nVue.config.ignoredElements = [/^ui5-/];`;
1+
let ui5 = "\nVue.config.ignoredElements = [/^ui5-/];";
22

3-
module.exports = (api, opts, rootOptions) => {
3+
module.exports = (api, options, rootOptions) => {
44
api.extendPackage({
55
dependencies: {
66
"@ui5/webcomponents": "^0.9.0"
77
}
88
});
9-
if (opts.addExample) {
10-
api.render('./template', {
11-
...opts,
9+
if (options.addExample) {
10+
api.render("./template", {
11+
...options
1212
});
1313
}
1414
api.onCreateComplete(() => {
1515
// inject to main.js
16-
const fs = require('fs');
17-
const ext = api.hasPlugin('typescript') ?
18-
'ts' :
19-
'js';
16+
const fs = require("fs");
17+
const ext = api.hasPlugin("typescript")
18+
? "ts"
19+
: "js";
2020
const mainPath = api.resolve(`./src/main.${ext}`);
21-
// get content
22-
let contentMain = fs.readFileSync(mainPath, {
23-
encoding: 'utf-8'
24-
});
21+
let contentMain = fs.readFileSync(mainPath, {encoding: "utf-8"});
2522
const lines = contentMain
2623
.split(/\r?\n/g)
2724
.reverse();
2825

29-
// inject import
3026
const lastImportIndex = lines.findIndex(line => line.match(/^import/));
3127
lines[lastImportIndex] += ui5;
3228

33-
// modify app
3429
contentMain = lines
3530
.reverse()
36-
.join('\n');
37-
fs.writeFileSync(mainPath, contentMain, {
38-
encoding: 'utf-8'
39-
});
31+
.join("\n");
32+
fs.writeFileSync(mainPath, contentMain, {encoding: "utf-8"});
33+
api.exitLog("Successfully installed UI5 Web Components", "done");
4034
});
41-
}
35+
};

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /