Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
4de1ca4
feat: upgrade to webpack 5
Apr 6, 2023
1f8cba4
feat: add resources
Apr 6, 2023
503778d
feat: add fonts scss
Apr 6, 2023
53faddb
fix: simplify
Apr 6, 2023
aaf015f
fix: allowjs
Apr 6, 2023
a0092b0
feat: add alias
Apr 6, 2023
2d400a3
fix: change 2 spaces to 4
Apr 6, 2023
b7f2fee
feat: add postcss
Apr 6, 2023
1886bcf
feat: rewrite readme
zzyueb Apr 6, 2023
227d04b
feat: ignore ds_store for apple
zzyueb Apr 6, 2023
e5cf9a7
feat: change to webpack-chain
zzyueb Apr 17, 2023
28c527f
fix: formatter
zzyueb Apr 17, 2023
89354bd
feat: add optimizers
zzyueb Apr 18, 2023
1580e30
fix: simplify index tsx
zzyueb Apr 18, 2023
5d314ec
feat: rewrite app.tsx
zzyueb Apr 19, 2023
9700782
feat: delete unused
zzyueb Apr 19, 2023
30db8b6
feat: use uglify
zzyueb Apr 19, 2023
d38b9b5
fix: simp
zzyueb Apr 19, 2023
dc866c7
fix: add semi
zzyueb Apr 20, 2023
05db75a
feat: add solid router
zzyueb Apr 20, 2023
72fe822
fix: path
zzyueb Apr 20, 2023
63338c3
docs: readme
zzyueb Apr 20, 2023
1456231
feat: add minicss extract plugin
zzyueb Apr 22, 2023
10a7051
fix: build
zzyueb Apr 22, 2023
6447c10
fix: add mini css extract
zzyueb Apr 27, 2023
75e859f
fix: add minify
zzyueb Apr 27, 2023
e1b91e3
feat: use cross env
zzyueb Apr 28, 2023
b3d68f8
feat: add eslint
zzyueb Apr 29, 2023
84bd633
fix: use --fix
zzyueb Apr 29, 2023
b7fb70e
feat: add style lint
zzyueb Apr 29, 2023
3c6f339
feat: add editor config
zzyueb Apr 29, 2023
df2ffaa
fix: some strange errors
zzyueb Apr 29, 2023
4e26919
feat: add route
zzyueb Apr 29, 2023
0aa780d
feat: add eslint webpack plugin and fix alias
zzyueb Apr 30, 2023
4d6c380
fix: paths
zzyueb Apr 30, 2023
78e4fa2
fiix: es2022
zzyueb Apr 30, 2023
78685f6
feat: add corejs
zzyueb Apr 30, 2023
000201b
fix: use builtins
zzyueb Apr 30, 2023
693337d
fix: simplify code
zzyueb May 1, 2023
a4c7e2f
fix: delete consoleLog
zzyueb May 1, 2023
8bbeb53
fix: improve gitignore
zzyueb May 1, 2023
cf5f9ac
fix: add nodejs version limitation
zzyueb May 1, 2023
2265402
fix: unify formatter command
zzyueb May 1, 2023
2f438b2
fix: lex
zzyueb May 1, 2023
342e4c5
fix: grammar
zzyueb May 1, 2023
a40c847
fix: The browser will not open automatically when you are at dev mode
zzyueb May 2, 2023
56df921
fix: upgrrade packages
zzyueb May 2, 2023
e4b95e3
fix: editor config blank line
zzyueb May 2, 2023
5ff4490
fix: delete unused
zzyueb May 2, 2023
d2bf0a1
pref: simplify
zzyueb May 2, 2023
ae4c771
feat: use a function
zzyueb May 2, 2023
2d19a84
feat: add solid-refresh
zzyueb May 3, 2023
26cb292
feat: rewrite
zzyueb May 3, 2023
6d04bff
fix: set liveReload in webpack base
zzyueb May 3, 2023
7e43594
feat: upgrade packages
zzyueb Jun 20, 2023
632c278
feat: nested router
zzyueb Jun 20, 2023
eb67312
feat: add route guard
zzyueb Jun 20, 2023
756158f
feat: 路由守卫
zzyueb Jun 20, 2023
3516cf6
feat: upgrade dependencies
zzyueb Jul 16, 2023
7508018
feat: add CHANGELOG and rename postcss configure
zzyueb Jul 22, 2023
9cd642e
fix: add changelog
zzyueb Jul 22, 2023
d522e67
fix: formatter settings
zzyueb Jul 22, 2023
4e65ba8
feat: add Chn doc and license
zzyueb Jul 22, 2023
39d690b
fix: 中文文档入口
zzyueb Jul 22, 2023
210d7e8
feat: add stylelint
zzyueb Jul 30, 2023
aca8f64
docs: CHANGELOG
zzyueb Jul 30, 2023
0cc969c
feat: babel add corejs config
zzyueb Jul 30, 2023
444f89a
feat: corejs 3.32
zzyueb Jul 30, 2023
0a4e8db
feat: upgrade packages
zzyueb Aug 5, 2023
e47ee2f
feat: open stylelint scss
zzyueb Aug 5, 2023
c48df0a
feat: change public to html
zzyueb Aug 5, 2023
214ed45
feat: add favicon
zzyueb Aug 5, 2023
6d84365
docs: changelog
zzyueb Aug 5, 2023
fbe68ca
feat: upgrade
zzyueb Aug 5, 2023
f2d943d
feat: upgrade packages
zzyueb Aug 5, 2023
5221bbb
feat: Update README.md
Allen-Bayern Aug 7, 2023
69c72a6
feat: add css module support
zzyueb Aug 11, 2023
7fd4459
pref: node version limit
zzyueb Aug 12, 2023
0632438
feat: upgrade
zzyueb Aug 12, 2023
77d81f0
feat: upgrade packages
zzyueb Aug 12, 2023
5bde5a7
feat: add solid eslint
zzyueb Aug 12, 2023
a423339
docs: changelog
zzyueb Aug 12, 2023
cb39874
feat: change to pnpm
zzyueb Aug 14, 2023
73b62bb
docs: CHANGELOG
zzyueb Aug 14, 2023
599138d
fix: change license
zzyueb Aug 14, 2023
4bbd6ea
feat: change lang
zzyueb Aug 26, 2023
2c6fd4b
fix: eslint problems
zzyueb Aug 26, 2023
693c182
pref: change function to const
zzyueb Aug 26, 2023
7a65909
feat: update
zzyueb Oct 14, 2023
360da1b
feat: up pnpm
zzyueb Oct 14, 2023
aa9cda1
perf: update
zzyueb Nov 29, 2023
a6bbf46
chore: 包更新及中文文档
zzyueb Feb 11, 2024
6405881
chore: delete unused
zzyueb Feb 11, 2024
b386f20
fix: to css modules
zzyueb Feb 11, 2024
c9e42c9
fix: bug fix
zzyueb Feb 11, 2024
b890c22
fix: update README git repo address
zzyueb Feb 18, 2024
bce8de3
fix: add resolve-url-loader to fix url() in scss
zzyueb Apr 30, 2024
fbbc40a
docs: add changelog
zzyueb Apr 30, 2024
95d1983
docs: update README
zzyueb May 2, 2024
2f8df1d
fix: Rewrite doc
zzyueb May 2, 2024
b00e2d2
fix: trans style-module kebab-case to camelCase
zzyueb May 9, 2024
01bc1bc
feat: take new solid router
zzyueb May 9, 2024
1ea6cea
feat: add createImmer
zzyueb May 9, 2024
7edd5af
perf: createImmer
zzyueb May 9, 2024
6a08258
perf: if '#app' is not exist, render to body
zzyueb May 9, 2024
32ce29b
fix: shallow equal fn
zzyueb May 10, 2024
23124e6
perf: code better
zzyueb May 10, 2024
aee6d2d
perf: shallowEqual function
zzyueb May 10, 2024
2997559
fix: not uniq, but intersection
zzyueb May 11, 2024
c17cd7c
feat: add shims-pics
zzyueb May 11, 2024
1cca493
perf: Improve the createImmer
zzyueb May 11, 2024
21a4ab9
perf: import position
zzyueb May 11, 2024
4868ef6
feat: add createTimeout and createInterval
zzyueb May 11, 2024
c914070
perf: createTitle
zzyueb May 11, 2024
ca34028
perf: defaultTitle
zzyueb May 11, 2024
f6a3e42
fix: deep freeze
zzyueb May 11, 2024
9182145
feat: add test codes of 'createTitle', 'createEffect'
zzyueb May 12, 2024
bf17745
ci: eslint add avoidEscape rule
zzyueb May 12, 2024
b72252f
perf: update corejs version
zzyueb May 12, 2024
0452bb2
feat: add create-set
zzyueb May 12, 2024
23b91f6
feat: update packages
zzyueb May 19, 2024
1d0e050
fix: add style.module.less
zzyueb Jun 27, 2024
cceb33a
fix: loadStyles oneOf keys bug
zzyueb Jun 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_size = 4
indent_style = space
23 changes: 23 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
env: {
browser: true,
es2022: true,
node: true,
},
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier', 'plugin:solid/typescript'],
overrides: [],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'prettier', 'solid'],
rules: {
indent: ['error', 4, { SwitchCase: 1 }],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single', { avoidEscape: true }],
semi: ['error', 'always'],
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
'@typescript-eslint/no-var-requires': 'off',
},
};
136 changes: 134 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,134 @@
dist/
node_modules/
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

.DS_Store

test.*
3 changes: 3 additions & 0 deletions .postcssrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
plugins: [require('postcss-preset-env'), require('autoprefixer')],
};
9 changes: 9 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
printWidth: 120
tabWidth: 4
semi: true
singleQuote: true
trailingComma: 'es5'
bracketSameLine: false
arrowParens: 'avoid'
singleAttributePerLine: true
proseWrap: never
8 changes: 8 additions & 0 deletions .stylelintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
root: true,
extends: ['stylelint-config-standard', 'stylelint-config-standard-scss'],
plugins: ['stylelint-prettier'],
rules: {
'prettier/prettier': true,
},
};
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "explicit"
},
"eslint.enable": true,
"stylelint.enable": true,
"stylelint.configFile": ".stylelintrc.cjs",
"stylelint.validate": ["scss"],
"scss.validate": true
}
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Change Log

## Upgraded at April 6th, 2023 (UTC + 8)

- Upgrade the webpack version from 4 to 5;
- Add loaders of style, include `style-loader`, `css-loader`, `postcss-loader` and `sass-loader`;
- Split the config for variant environments. You can find `webpack.common.js`, `webpack.dev.js` and `webpack.prod.js` from the folder `./conf`. You can just modify them.

## Upgraded at April 20th, 2023 (UTC + 8)

- Use `webpack-chain` to rewrite the `webpack.config.js`;
- Install `@solidjs/router`;

## Upgraded (I have forgot the time ...)

- add `eslint`, `stylelint`, `prettier` and gave really basic configs

## Upgraded at June 30th, 2023 (UTC + 8)

- Add `stylelint` config to `.vscode/settings.json`

## Upgraded at August 5th, 2023 (UTC + 8)

- Add favicon

## Upgraded at August 12th, 2023 (UTC + 8)

- Add `css module` support

## Upgraded at August 13th, 2023 (UTC + 8)

- Upgrade `prettier` to `3.0`
- Add `eslint-plugin-solid`

## Upgraded at August 14th, 2023 (UTC + 8)

- Change package manager from `npm` to `pnpm`

## Fixed at April 30th, 2024 (UTC + 8)

- add `url-resolve-loader` to resolve the `url()` error in `scss`
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
# Solid TS Webpack Starter

Really basic starter. This build has a very minimal typescript setup with webpack, and webpack dev server. It does nothing else. No CSS or anything. Use this as a quick way to get started if you intend to build your webpack config yourself.
Really basic starter. This build has a very minimal typescript setup with webpack, and webpack dev server. It has been added css-preprocessor `sass` and its loader, and some useful loaders and plugins. Use this as a quick way to get started if you intend to build your webpack config yourself.

[中文文档 (并非逐字逐句翻译)](./README_zh-cn.md)

## Clone the repository as your project's template

```sh
# Using npx
npx degit https://github.com/My-Project-Template/solid-ts-webpack5.git YOUR_PROJECT_DIRECTORY
npm i

# Using yarn
yarn dlx degit https://github.com/My-Project-Template/solid-ts-webpack5.git YOUR_PROJECT_DIRECTORY
yarn

# Using pnpm
pnpm dlx degit https://github.com/My-Project-Template/solid-ts-webpack5.git YOUR_PROJECT_DIRECTORY
pnpm up
```

## References

- [changelog](./CHANGELOG.md)
- [webpack config](./webpack/webpack.base.js)
20 changes: 20 additions & 0 deletions README_zh-cn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 关于本项目

从官方项目模板`fork`而来,并在这基础上完善了一些,可以开箱即用。预装配置包括:

* `solid @^1.0.0`
* `solid-router`
* `sass`
* `TypeScript @^5.0.0`

更具体的配置可从[Webpack配置文件](./webpack/webpack.base.js)查看, 但不建议直接修改!

复制为模板:

```sh
# npm
$ npx degit https://github.com/My-Project-Template/solid-ts-webpack5.git YOUR_PROJECT

# pnpm
$ pnpm dlx degit https://github.com/My-Project-Template/solid-ts-webpack5.git YOUR_PROJECT
```
21 changes: 21 additions & 0 deletions babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
useBuiltIns: 'usage',
corejs: '3.37',
},
],
'solid',
'@babel/preset-typescript',
],
plugins: [
[
'solid-refresh/babel',
{
bundler: 'webpack5', // or "rspack-esm"
},
],
],
};
Binary file added html/favicon-solid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions html/index.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="<%= htmlWebpackPlugin.options.templateParameters.lang %>">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<div id="app"></div>
</body>
</html>
21 changes: 21 additions & 0 deletions license
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Yueb

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading