Add new build scripts

pull/45/head
Nikita Karamov 2022-02-10 21:44:53 +01:00
parent f6d5e43bcb
commit 50d9e900f2
No known key found for this signature in database
GPG Key ID: 3C8E688C96EEB9C9
2 changed files with 5 additions and 4 deletions

View File

@ -32,9 +32,10 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"build": "rollup --config", "build": "pnpm run build:js && pnpm run build:css",
"build:dev": "cross-env NODE_ENV=development rollup --config", "build:js": "vite build",
"dev": "cross-env NODE_ENV=development rollup --config --watch", "build:css": "postcss src/shareon.css -o dist/shareon.min.css --map",
"dev": "vite",
"lint": "prettier --check . && eslint src/*.js", "lint": "prettier --check . && eslint src/*.js",
"size": "size-limit", "size": "size-limit",
"test": "pnpm run lint && pnpm run build && pnpm run size", "test": "pnpm run lint && pnpm run build && pnpm run size",
@ -55,6 +56,7 @@
"postcss": "^8.4.6", "postcss": "^8.4.6",
"postcss-banner": "^4.0.1", "postcss-banner": "^4.0.1",
"postcss-calc": "^8.2.3", "postcss-calc": "^8.2.3",
"postcss-cli": "^9.1.0",
"postcss-css-variables": "^0.18.0", "postcss-css-variables": "^0.18.0",
"prettier": "^2.5.1", "prettier": "^2.5.1",
"rollup": "^2.67.0", "rollup": "^2.67.0",

View File

@ -1,5 +1,4 @@
import initializeShareon from "./shareon"; import initializeShareon from "./shareon";
import "./shareon.css";
// TODO: update README // TODO: update README
const s = document.currentScript; const s = document.currentScript;