Skip to content

Commit 121b2c5

Browse files
committed
init
0 parents  commit 121b2c5

File tree

8 files changed

+7477
-0
lines changed

8 files changed

+7477
-0
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*.log
2+
.DS_Store
3+
node_modules
4+
.rts2_cache_cjs
5+
.rts2_cache_esm
6+
.rts2_cache_umd
7+
.rts2_cache_system
8+
dist

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Evan You
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# TSDX Bootstrap
2+
3+
This project was bootstrapped with [TSDX](https://github.com/jaredpalmer/tsdx).
4+
5+
## Local Development
6+
7+
Below is a list of commands you will probably find useful.
8+
9+
### `npm start` or `yarn start`
10+
11+
Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab.
12+
13+
<img src="https://user-images.githubusercontent.com/4060187/52168303-574d3a00-26f6-11e9-9f3b-71dbec9ebfcb.gif" width="600" />
14+
15+
Your library will be rebuilt if you make edits.
16+
17+
### `npm run build` or `yarn build`
18+
19+
Bundles the package to the `dist` folder.
20+
The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).
21+
22+
<img src="https://user-images.githubusercontent.com/4060187/52168322-a98e5b00-26f6-11e9-8cf6-222d716b75ef.gif" width="600" />
23+
24+
### `npm test` or `yarn test`
25+
26+
Runs the test watcher (Jest) in an interactive mode.
27+
By default, runs tests related to files changed since the last commit.

package.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "vue-loader",
3+
"version": "16.0.0-alpha.0",
4+
"license": "MIT",
5+
"author": "Evan You",
6+
"main": "dist/index.js",
7+
"module": "dist/vue-loader.esm.js",
8+
"typings": "dist/index.d.ts",
9+
"files": [
10+
"dist"
11+
],
12+
"scripts": {
13+
"start": "tsdx watch",
14+
"build": "tsdx build",
15+
"test": "tsdx test",
16+
"lint": "tsdx lint"
17+
},
18+
"peerDependencies": {
19+
"@vue/compiler-sfc": "^3.0.0-alpha.0"
20+
},
21+
"husky": {
22+
"hooks": {
23+
"pre-commit": "tsdx lint --fix"
24+
}
25+
},
26+
"prettier": {
27+
"printWidth": 80,
28+
"semi": false,
29+
"singleQuote": true
30+
},
31+
"devDependencies": {
32+
"@types/jest": "^24.0.23",
33+
"@types/webpack": "^4.41.0",
34+
"husky": "^3.1.0",
35+
"tsdx": "^0.11.0",
36+
"tslib": "^1.10.0",
37+
"typescript": "^3.7.3",
38+
"webpack": "^4.41.2"
39+
}
40+
}

src/index.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import * as webpack from 'webpack'
2+
import { TemplateCompiler, CompilerOptions } from '@vue/compiler-sfc'
3+
4+
export interface VueLoaderOptions {
5+
transformAssetUrls?: { [tag: string]: string | Array<string> }
6+
compiler?: TemplateCompiler
7+
compilerOptions?: CompilerOptions
8+
hotReload?: boolean
9+
productionMode?: boolean
10+
cacheDirectory?: string
11+
cacheIdentifier?: string
12+
exposeFilename?: boolean
13+
}
14+
15+
const vueLoader: webpack.loader.Loader = function (source) {
16+
const loaderContext = this
17+
}
18+
19+
export default vueLoader

test/basic.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test('should work', () => {
2+
3+
})

tsconfig.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"include": ["src", "types", "test"],
3+
"compilerOptions": {
4+
"target": "es5",
5+
"module": "esnext",
6+
"lib": ["dom", "esnext"],
7+
"importHelpers": true,
8+
"declaration": true,
9+
"sourceMap": true,
10+
"rootDir": "./",
11+
"strict": true,
12+
"noImplicitAny": true,
13+
"strictNullChecks": true,
14+
"strictFunctionTypes": true,
15+
"strictPropertyInitialization": true,
16+
"noImplicitThis": true,
17+
"alwaysStrict": true,
18+
"noUnusedLocals": true,
19+
"noUnusedParameters": true,
20+
"noImplicitReturns": true,
21+
"noFallthroughCasesInSwitch": true,
22+
"moduleResolution": "node",
23+
"baseUrl": "./",
24+
"paths": {
25+
"*": ["src/*", "node_modules/*"]
26+
},
27+
"jsx": "react",
28+
"esModuleInterop": true
29+
}
30+
}

0 commit comments

Comments
 (0)