diff --git a/packages/create-fes-app/templates/app/h5/tsconfig.json b/packages/create-fes-app/templates/app/h5/tsconfig.json new file mode 100644 index 00000000..ea930c0b --- /dev/null +++ b/packages/create-fes-app/templates/app/h5/tsconfig.json @@ -0,0 +1,37 @@ +{ + "compilerOptions": { + "outDir": "build/dist", + "module": "esnext", + "target": "esnext", + "lib": ["esnext", "dom"], + "sourceMap": true, + "baseUrl": ".", + "jsx": "preserve", + "allowSyntheticDefaultImports": true, + "moduleResolution": "node", + "forceConsistentCasingInFileNames": true, + "noImplicitReturns": true, + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true, + "allowJs": true, + "skipLibCheck": true, + "experimentalDecorators": true, + "strict": true, + "paths": { + "@/*": ["./src/*"], + "@@/*": ["./src/.fes/*"] + } + }, + "include": [ + "src/**/*", + "tests/**/*", + "test/**/*", + "__test__/**/*", + "typings/**/*", + "config/**/*", + ".eslintrc.js", + ".stylelintrc.js", + ".prettierrc.js" + ], + "exclude": ["node_modules", "build", "dist", "scripts", "src/.fes/*", "webpack", "jest"] +} diff --git a/packages/create-fes-app/templates/app/pc/tsconfig.json b/packages/create-fes-app/templates/app/pc/tsconfig.json new file mode 100644 index 00000000..ea930c0b --- /dev/null +++ b/packages/create-fes-app/templates/app/pc/tsconfig.json @@ -0,0 +1,37 @@ +{ + "compilerOptions": { + "outDir": "build/dist", + "module": "esnext", + "target": "esnext", + "lib": ["esnext", "dom"], + "sourceMap": true, + "baseUrl": ".", + "jsx": "preserve", + "allowSyntheticDefaultImports": true, + "moduleResolution": "node", + "forceConsistentCasingInFileNames": true, + "noImplicitReturns": true, + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true, + "allowJs": true, + "skipLibCheck": true, + "experimentalDecorators": true, + "strict": true, + "paths": { + "@/*": ["./src/*"], + "@@/*": ["./src/.fes/*"] + } + }, + "include": [ + "src/**/*", + "tests/**/*", + "test/**/*", + "__test__/**/*", + "typings/**/*", + "config/**/*", + ".eslintrc.js", + ".stylelintrc.js", + ".prettierrc.js" + ], + "exclude": ["node_modules", "build", "dist", "scripts", "src/.fes/*", "webpack", "jest"] +} diff --git a/packages/fes-template-h5/package.json b/packages/fes-template-h5/package.json index e782decb..02fb52a9 100644 --- a/packages/fes-template-h5/package.json +++ b/packages/fes-template-h5/package.json @@ -16,9 +16,14 @@ "files": [ ".eslintrc.js", ".gitignore", + ".fes.js", + ".fes.prod.js", + "mock.js", "package.json", "README.md", - "/src" + "tsconfig.json", + "/src", + "/config" ], "repository": { "type": "git", diff --git a/packages/fes-template-h5/tsconfig.json b/packages/fes-template-h5/tsconfig.json new file mode 100644 index 00000000..ea930c0b --- /dev/null +++ b/packages/fes-template-h5/tsconfig.json @@ -0,0 +1,37 @@ +{ + "compilerOptions": { + "outDir": "build/dist", + "module": "esnext", + "target": "esnext", + "lib": ["esnext", "dom"], + "sourceMap": true, + "baseUrl": ".", + "jsx": "preserve", + "allowSyntheticDefaultImports": true, + "moduleResolution": "node", + "forceConsistentCasingInFileNames": true, + "noImplicitReturns": true, + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true, + "allowJs": true, + "skipLibCheck": true, + "experimentalDecorators": true, + "strict": true, + "paths": { + "@/*": ["./src/*"], + "@@/*": ["./src/.fes/*"] + } + }, + "include": [ + "src/**/*", + "tests/**/*", + "test/**/*", + "__test__/**/*", + "typings/**/*", + "config/**/*", + ".eslintrc.js", + ".stylelintrc.js", + ".prettierrc.js" + ], + "exclude": ["node_modules", "build", "dist", "scripts", "src/.fes/*", "webpack", "jest"] +} diff --git a/packages/fes-template/package.json b/packages/fes-template/package.json index 21bb99e8..162a3098 100644 --- a/packages/fes-template/package.json +++ b/packages/fes-template/package.json @@ -18,11 +18,14 @@ "files": [ ".eslintrc.js", ".gitignore", - "fes.config.js", + ".fes.js", + ".fes.prod.js", "mock.js", "package.json", "README.md", - "/src" + "tsconfig.json", + "/src", + "/config" ], "repository": { "type": "git", diff --git a/packages/fes-template/src/pages/test.vue b/packages/fes-template/src/pages/test.vue new file mode 100644 index 00000000..587abc5a --- /dev/null +++ b/packages/fes-template/src/pages/test.vue @@ -0,0 +1,10 @@ + + diff --git a/packages/fes-template/tsconfig.json b/packages/fes-template/tsconfig.json new file mode 100644 index 00000000..ea930c0b --- /dev/null +++ b/packages/fes-template/tsconfig.json @@ -0,0 +1,37 @@ +{ + "compilerOptions": { + "outDir": "build/dist", + "module": "esnext", + "target": "esnext", + "lib": ["esnext", "dom"], + "sourceMap": true, + "baseUrl": ".", + "jsx": "preserve", + "allowSyntheticDefaultImports": true, + "moduleResolution": "node", + "forceConsistentCasingInFileNames": true, + "noImplicitReturns": true, + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true, + "allowJs": true, + "skipLibCheck": true, + "experimentalDecorators": true, + "strict": true, + "paths": { + "@/*": ["./src/*"], + "@@/*": ["./src/.fes/*"] + } + }, + "include": [ + "src/**/*", + "tests/**/*", + "test/**/*", + "__test__/**/*", + "typings/**/*", + "config/**/*", + ".eslintrc.js", + ".stylelintrc.js", + ".prettierrc.js" + ], + "exclude": ["node_modules", "build", "dist", "scripts", "src/.fes/*", "webpack", "jest"] +} diff --git a/packages/fes/package.json b/packages/fes/package.json index e57b08d1..29c3696b 100644 --- a/packages/fes/package.json +++ b/packages/fes/package.json @@ -9,7 +9,8 @@ "files": [ "lib", "dist", - "bin" + "bin", + "types.d.ts" ], "bin": { "fes": "./bin/fes.js" @@ -49,5 +50,6 @@ }, "engines": { "node": "^10.12.0 || ^12.0.0 || >= 14.0.0" - } + }, + "types": "types.d.ts" } diff --git a/packages/fes/types.d.ts b/packages/fes/types.d.ts new file mode 100644 index 00000000..89ad8bf8 --- /dev/null +++ b/packages/fes/types.d.ts @@ -0,0 +1,5 @@ + +// @ts-ignore +export * from '@@/core/coreExports'; +// @ts-ignore +export * from '@@/core/pluginExports'; diff --git a/yarn.lock b/yarn.lock index 497bde7f..4a197e13 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5251,6 +5251,14 @@ babel-plugin-dynamic-import-node@2.3.3, babel-plugin-dynamic-import-node@^2.3.0, dependencies: object.assign "^4.1.0" +babel-plugin-import@1.13.3: + version "1.13.3" + resolved "https://registry.yarnpkg.com/babel-plugin-import/-/babel-plugin-import-1.13.3.tgz#9dbbba7d1ac72bd412917a830d445e00941d26d7" + integrity sha512-1qCWdljJOrDRH/ybaCZuDgySii4yYrtQ8OJQwrcDqdt0y67N30ng3X3nABg6j7gR7qUJgcMa9OMhc4AGViDwWw== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/runtime" "^7.0.0" + babel-plugin-import@^1.13.1: version "1.13.1" resolved "https://registry.npmjs.org/babel-plugin-import/-/babel-plugin-import-1.13.1.tgz#f6cf1acb76c5ce366bae2663ad12bd894316d8db"