-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into feature/init-lerna
- Loading branch information
Showing
11 changed files
with
3,321 additions
and
1,522 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module.exports = function (api) { | ||
api.cache(true); | ||
|
||
return { | ||
presets: [ | ||
"@babel/preset-typescript", | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
targets: { | ||
edge: "17", | ||
firefox: "60", | ||
chrome: "67", | ||
safari: "11.1", | ||
esmodules: true, | ||
}, | ||
}, | ||
], | ||
], | ||
plugins: [ | ||
["@babel/plugin-proposal-decorators", { legacy: true }], | ||
["@babel/plugin-proposal-class-properties", { loose: true }], | ||
], | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import babel from "@rollup/plugin-babel"; | ||
import commonjs from "@rollup/plugin-commonjs"; | ||
import copy from "rollup-plugin-copy"; | ||
import filesize from "rollup-plugin-filesize"; | ||
import resolve from "@rollup/plugin-node-resolve"; | ||
import serve from "rollup-plugin-serve"; | ||
import { terser } from "rollup-plugin-terser"; | ||
import typescript2 from "rollup-plugin-typescript2"; | ||
|
||
const production = !process.env.ROLLUP_WATCH; | ||
const extensions = [".js", ".jsx", ".ts", ".tsx", ".mjs"]; | ||
const outputDir = "./dist/"; | ||
|
||
export default { | ||
input: "./src/tgs-player.ts", | ||
treeshake: !!production, | ||
output: [ | ||
{ | ||
file: "./dist/tgs-player.esm.js", | ||
// dir: outputDir, | ||
format: "es", | ||
sourcemap: true, | ||
}, | ||
{ | ||
file: "./dist/tgs-player.js", | ||
format: "umd", | ||
name: "lottie-player", | ||
sourcemap: true, | ||
}, | ||
], | ||
plugins: [ | ||
resolve({ extensions }), | ||
commonjs({ include: /node_modules/ }), | ||
typescript2({ | ||
check: false, | ||
}), | ||
babel({ | ||
extensions: extensions, | ||
exclude: ["./node_modules/@babel/**/*", "./node_modules/core-js/**/*"], | ||
}), | ||
!production && | ||
copy({ | ||
targets: [ | ||
{ src: "./src/index.html", dest: outputDir }, | ||
{ src: "./src/sticker.tgs", dest: outputDir }, | ||
{ | ||
src: "./node_modules/@webcomponents/webcomponentsjs/bundles/", | ||
dest: outputDir, | ||
}, | ||
{ | ||
src: | ||
"./node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js", | ||
dest: outputDir, | ||
}, | ||
], | ||
}), | ||
filesize(), | ||
!production && | ||
serve({ | ||
contentBase: [outputDir], | ||
open: true, | ||
host: "localhost", | ||
port: 10001, | ||
}), | ||
|
||
production && terser(), | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import babel from "@rollup/plugin-babel"; | ||
import commonjs from "@rollup/plugin-commonjs"; | ||
import copy from "rollup-plugin-copy"; | ||
import filesize from "rollup-plugin-filesize"; | ||
import resolve from "@rollup/plugin-node-resolve"; | ||
import serve from "rollup-plugin-serve"; | ||
import { terser } from "rollup-plugin-terser"; | ||
import typescript2 from "rollup-plugin-typescript2"; | ||
|
||
const production = !process.env.ROLLUP_WATCH; | ||
const extensions = [".js", ".jsx", ".ts", ".tsx", ".mjs"]; | ||
const outputDir = "./dist/"; | ||
|
||
export default { | ||
input: "./src/lottie-player.ts", | ||
treeshake: false, | ||
output: [ | ||
{ | ||
file: "./dist/lottie-player.esm.js", | ||
// dir: outputDir, | ||
format: "es", | ||
sourcemap: true, | ||
}, | ||
{ | ||
file: "./dist/lottie-player.js", | ||
format: "umd", | ||
name: "lottie-player", | ||
sourcemap: true, | ||
}, | ||
], | ||
plugins: [ | ||
resolve({ extensions }), | ||
commonjs({ include: /node_modules/ }), | ||
typescript2({ | ||
check: false, | ||
}), | ||
babel({ | ||
extensions: extensions, | ||
exclude: ["./node_modules/@babel/**/*", "./node_modules/core-js/**/*"], | ||
}), | ||
!production && | ||
copy({ | ||
targets: [ | ||
{ src: "./src/index.html", dest: outputDir }, | ||
{ src: "./src/sticker.tgs", dest: outputDir }, | ||
{ | ||
src: "./node_modules/@webcomponents/webcomponentsjs/bundles/", | ||
dest: outputDir, | ||
}, | ||
{ | ||
src: | ||
"./node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js", | ||
dest: outputDir, | ||
}, | ||
], | ||
}), | ||
filesize(), | ||
!production && | ||
serve({ | ||
contentBase: [outputDir], | ||
open: true, | ||
host: "localhost", | ||
port: 10000, | ||
}), | ||
|
||
production && terser(), | ||
], | ||
}; |
Binary file not shown.
Oops, something went wrong.