├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitattributes ├── .github └── workflows │ └── node.js.yml ├── .gitignore ├── .npmignore ├── .prettierrc ├── README.md ├── __tests__ ├── load-san-entry.spec.js ├── load-san-parts.spec.js ├── option-compileTemplate.spec.js ├── scoped-css.spec.js └── webpack-context.stub.js ├── babel.config.js ├── examples ├── hmr │ ├── README.md │ ├── assets │ │ └── san-logo.png │ ├── index.html │ ├── package.json │ ├── src │ │ ├── App.san │ │ ├── components │ │ │ ├── comp-child │ │ │ │ ├── SubComponent.san │ │ │ │ └── index.san │ │ │ ├── comp-component.san │ │ │ ├── comp-custom-store.san │ │ │ ├── comp-global-store.san │ │ │ ├── comp-pug.san │ │ │ ├── comp-simple-obj.san │ │ │ ├── comp-src │ │ │ │ ├── index.san │ │ │ │ ├── script.js │ │ │ │ ├── style.less │ │ │ │ └── template.html │ │ │ ├── comp-ts-component.san │ │ │ ├── js │ │ │ │ └── comp-global-store │ │ │ │ │ ├── index.js │ │ │ │ │ ├── style.less │ │ │ │ │ └── template.html │ │ │ └── ts │ │ │ │ └── comp-simple-ts │ │ │ │ ├── index.ts │ │ │ │ ├── style.less │ │ │ │ └── template.html │ │ ├── index.js │ │ └── store │ │ │ ├── custom-action.js │ │ │ ├── custom-store.js │ │ │ └── global-action.js │ ├── tsconfig.json │ └── webpack.config.js └── minimal │ ├── App.san │ ├── index.html │ ├── main.js │ ├── package.json │ └── webpack.config.js ├── index.js ├── lib ├── blocks │ ├── script.js │ ├── style.js │ └── template.js ├── loader.js ├── plugin-webpack4.js ├── plugin-webpack5.js ├── plugin.js ├── runtime │ └── normalize.js └── utils │ ├── codegen.js │ ├── helper.js │ ├── parse.js │ ├── preparse.js │ └── set-scope-id.js ├── package.json └── scripts └── test.js /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/.editorconfig -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/.eslintignore -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/.eslintrc.js -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.san linguist-language=HTML 2 | -------------------------------------------------------------------------------- /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/.github/workflows/node.js.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/.gitignore -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | examples 2 | __tests__ 3 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/.prettierrc -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/README.md -------------------------------------------------------------------------------- /__tests__/load-san-entry.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/__tests__/load-san-entry.spec.js -------------------------------------------------------------------------------- /__tests__/load-san-parts.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/__tests__/load-san-parts.spec.js -------------------------------------------------------------------------------- /__tests__/option-compileTemplate.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/__tests__/option-compileTemplate.spec.js -------------------------------------------------------------------------------- /__tests__/scoped-css.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/__tests__/scoped-css.spec.js -------------------------------------------------------------------------------- /__tests__/webpack-context.stub.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/__tests__/webpack-context.stub.js -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/babel.config.js -------------------------------------------------------------------------------- /examples/hmr/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/README.md -------------------------------------------------------------------------------- /examples/hmr/assets/san-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/assets/san-logo.png -------------------------------------------------------------------------------- /examples/hmr/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/index.html -------------------------------------------------------------------------------- /examples/hmr/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/package.json -------------------------------------------------------------------------------- /examples/hmr/src/App.san: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/App.san -------------------------------------------------------------------------------- /examples/hmr/src/components/comp-child/SubComponent.san: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/components/comp-child/SubComponent.san -------------------------------------------------------------------------------- /examples/hmr/src/components/comp-child/index.san: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/components/comp-child/index.san -------------------------------------------------------------------------------- /examples/hmr/src/components/comp-component.san: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/components/comp-component.san -------------------------------------------------------------------------------- /examples/hmr/src/components/comp-custom-store.san: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/components/comp-custom-store.san -------------------------------------------------------------------------------- /examples/hmr/src/components/comp-global-store.san: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/components/comp-global-store.san -------------------------------------------------------------------------------- /examples/hmr/src/components/comp-pug.san: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/components/comp-pug.san -------------------------------------------------------------------------------- /examples/hmr/src/components/comp-simple-obj.san: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/components/comp-simple-obj.san -------------------------------------------------------------------------------- /examples/hmr/src/components/comp-src/index.san: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/components/comp-src/index.san -------------------------------------------------------------------------------- /examples/hmr/src/components/comp-src/script.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/components/comp-src/script.js -------------------------------------------------------------------------------- /examples/hmr/src/components/comp-src/style.less: -------------------------------------------------------------------------------- 1 | .comp-src { 2 | background: purple; 3 | } 4 | 5 | -------------------------------------------------------------------------------- /examples/hmr/src/components/comp-src/template.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/components/comp-src/template.html -------------------------------------------------------------------------------- /examples/hmr/src/components/comp-ts-component.san: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/components/comp-ts-component.san -------------------------------------------------------------------------------- /examples/hmr/src/components/js/comp-global-store/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/components/js/comp-global-store/index.js -------------------------------------------------------------------------------- /examples/hmr/src/components/js/comp-global-store/style.less: -------------------------------------------------------------------------------- 1 | .comp-global-store-js { 2 | background: lightcoral; 3 | } 4 | -------------------------------------------------------------------------------- /examples/hmr/src/components/js/comp-global-store/template.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/components/js/comp-global-store/template.html -------------------------------------------------------------------------------- /examples/hmr/src/components/ts/comp-simple-ts/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/components/ts/comp-simple-ts/index.ts -------------------------------------------------------------------------------- /examples/hmr/src/components/ts/comp-simple-ts/style.less: -------------------------------------------------------------------------------- 1 | .comp-global-store-js { 2 | background: lightcoral; 3 | } 4 | -------------------------------------------------------------------------------- /examples/hmr/src/components/ts/comp-simple-ts/template.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/components/ts/comp-simple-ts/template.html -------------------------------------------------------------------------------- /examples/hmr/src/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/index.js -------------------------------------------------------------------------------- /examples/hmr/src/store/custom-action.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/store/custom-action.js -------------------------------------------------------------------------------- /examples/hmr/src/store/custom-store.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/store/custom-store.js -------------------------------------------------------------------------------- /examples/hmr/src/store/global-action.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/src/store/global-action.js -------------------------------------------------------------------------------- /examples/hmr/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/tsconfig.json -------------------------------------------------------------------------------- /examples/hmr/webpack.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/hmr/webpack.config.js -------------------------------------------------------------------------------- /examples/minimal/App.san: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/minimal/App.san -------------------------------------------------------------------------------- /examples/minimal/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/minimal/index.html -------------------------------------------------------------------------------- /examples/minimal/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/minimal/main.js -------------------------------------------------------------------------------- /examples/minimal/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/minimal/package.json -------------------------------------------------------------------------------- /examples/minimal/webpack.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/examples/minimal/webpack.config.js -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/index.js -------------------------------------------------------------------------------- /lib/blocks/script.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/lib/blocks/script.js -------------------------------------------------------------------------------- /lib/blocks/style.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/lib/blocks/style.js -------------------------------------------------------------------------------- /lib/blocks/template.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/lib/blocks/template.js -------------------------------------------------------------------------------- /lib/loader.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/lib/loader.js -------------------------------------------------------------------------------- /lib/plugin-webpack4.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/lib/plugin-webpack4.js -------------------------------------------------------------------------------- /lib/plugin-webpack5.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/lib/plugin-webpack5.js -------------------------------------------------------------------------------- /lib/plugin.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/lib/plugin.js -------------------------------------------------------------------------------- /lib/runtime/normalize.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/lib/runtime/normalize.js -------------------------------------------------------------------------------- /lib/utils/codegen.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/lib/utils/codegen.js -------------------------------------------------------------------------------- /lib/utils/helper.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/lib/utils/helper.js -------------------------------------------------------------------------------- /lib/utils/parse.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/lib/utils/parse.js -------------------------------------------------------------------------------- /lib/utils/preparse.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/lib/utils/preparse.js -------------------------------------------------------------------------------- /lib/utils/set-scope-id.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/lib/utils/set-scope-id.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/package.json -------------------------------------------------------------------------------- /scripts/test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomfe/san-loader/HEAD/scripts/test.js --------------------------------------------------------------------------------