1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-23 20:02:32 +08:00

0.1.2 (test ssr vitepress)

This commit is contained in:
Kevin Levron 2021-02-25 22:55:44 +01:00
parent b01b251577
commit a620b7cd32
14 changed files with 63560 additions and 360 deletions

59190
build/trois.js Normal file

File diff suppressed because one or more lines are too long

1
build/trois.js.map Normal file

File diff suppressed because one or more lines are too long

2
build/trois.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
build/trois.min.js.map Normal file

File diff suppressed because one or more lines are too long

3593
build/trois.module.cdn.js Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

2
build/trois.module.cdn.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "troisjs",
"version": "0.1.1",
"version": "0.1.2",
"scripts": {
"dev": "vite",
"build": "vite build",
@ -13,6 +13,7 @@
},
"devDependencies": {
"@rollup/plugin-buble": "^0.21.3",
"@rollup/plugin-node-resolve": "^11.2.0",
"@rollup/plugin-replace": "^2.3.3",
"@vitejs/plugin-vue": "^1.1.4",
"@vue/compiler-sfc": "^3.0.5",
@ -24,8 +25,8 @@
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.2.2",
"rollup-plugin-vue": "^6.0.0-beta.10",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-vue": "^6.0.0-beta.10",
"sass": "^1.26.10",
"vite": "^2.0.1"
},

View File

@ -2,7 +2,8 @@
import vue from 'rollup-plugin-vue';
import buble from '@rollup/plugin-buble';
import { terser } from "rollup-plugin-terser";
// import replace from '@rollup/plugin-replace';
import replace from '@rollup/plugin-replace';
import resolve from '@rollup/plugin-node-resolve';
const input = 'src/export.js';
const external = [
@ -25,11 +26,18 @@ const external = [
'vue',
];
const cdn_replaces = {
'from \'vue\'': 'from \'https://unpkg.com/vue@3.0.5/dist/vue.esm-browser.prod.js\'',
'from \'three\'': 'from \'https://unpkg.com/three@0.125.2/build/three.module.js\'',
'from \'three/examples': 'from \'https://unpkg.com/three@0.125.2/examples',
'from \'gsap\'': 'from \'https://unpkg.com/gsap@3.5.1/index.js\'',
delimiters: ['', ''],
};
const plugins = [
// commonjs(),
vue(),
buble({
// transforms: { forOf: false },
transforms: { asyncAwait: false, forOf: false },
objectAssign: 'Object.assign',
}),
];
@ -64,45 +72,35 @@ export default [
// terser(),
// ],
// },
// {
// input,
// external,
// output: {
// format: 'es',
// exports: 'named',
// file: 'build/trois.module.cdn.js',
// sourcemap: true,
// },
// plugins: [
// replace({
// 'from \'three\'': 'from \'https://unpkg.com/three@0.120.1/build/three.module.js\'',
// 'from \'three/examples': 'from \'https://unpkg.com/three@0.120.1/examples',
// 'from \'gsap\'': 'from \'https://unpkg.com/gsap@3.5.1/index.js\'',
// delimiters: ['', ''],
// }),
// ...plugins,
// ],
// },
// {
// input,
// external,
// output: {
// format: 'es',
// exports: 'named',
// file: 'build/trois.module.cdn.min.js',
// sourcemap: true,
// },
// plugins: [
// replace({
// 'from \'three\'': 'from \'https://unpkg.com/three@0.120.1/build/three.module.js\'',
// 'from \'three/examples': 'from \'https://unpkg.com/three@0.120.1/examples',
// 'from \'gsap\'': 'from \'https://unpkg.com/gsap@3.5.1/index.js\'',
// delimiters: ['', ''],
// }),
// ...plugins,
// terser(),
// ],
// },
{
input,
external,
output: {
format: 'es',
exports: 'named',
file: 'build/trois.module.cdn.js',
sourcemap: true,
},
plugins: [
replace(cdn_replaces),
...plugins,
],
},
{
input,
external,
output: {
format: 'es',
exports: 'named',
file: 'build/trois.module.cdn.min.js',
sourcemap: true,
},
plugins: [
replace(cdn_replaces),
...plugins,
terser(),
],
},
{
input,
external,
@ -128,27 +126,41 @@ export default [
terser(),
],
},
// {
// input,
// external,
// output: {
// format: 'cjs',
// file: 'build/trois.js',
// sourcemap: true,
// },
// plugins,
// },
// {
// input,
// external,
// output: {
// format: 'cjs',
// file: 'build/trois.min.js',
// sourcemap: true,
// },
// plugins: [
// ...plugins,
// terser(),
// ],
// },
{
input,
external: [
'gsap',
'vue',
],
output: {
format: 'cjs',
file: 'build/trois.js',
sourcemap: true,
},
plugins: [
...plugins,
resolve({
moduleDirectories: ['node_modules'],
}),
],
},
{
input,
external: [
'gsap',
'vue',
],
output: {
format: 'cjs',
file: 'build/trois.min.js',
sourcemap: true,
},
plugins: [
...plugins,
resolve({
moduleDirectories: ['node_modules'],
}),
terser(),
],
},
];