-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #440 from phase2/feature/dependency-detangler-part…
…-deux Updated Package Setup
- Loading branch information
Showing
8 changed files
with
119 additions
and
5 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,9 @@ | ||
# MIT License | ||
|
||
Copyright © 2024 Phase2 Technology | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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,24 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link | ||
rel="icon" | ||
type="image/svg+xml" | ||
href="https://vitejs.dev/logo.svg" | ||
integrity="sha384-06BVdAqONqVQiSmzjjP7XMnhVNO8uqluYtASoFLwhbNrgA4wyOB67/rVwjdgVoFw" | ||
crossorigin="anonymous" | ||
/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Component Test Page</title> | ||
<script src="/dist/index.js" type="module"></script> | ||
</head> | ||
|
||
<body> | ||
<outline-core-link | ||
><a href="https://github.com/phase2/outline" | ||
>Outline</a | ||
></outline-core-link | ||
> | ||
</body> | ||
</html> |
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,22 @@ | ||
|
||
/** | ||
* @file | ||
* This is a TypeScript declaration file. It provides type checking and autocompletion | ||
* for TypeScript files. It can be used as a reference for future components. | ||
* | ||
* @see {@link https://www.typescriptlang.org/docs/handbook/modules.html#ambient-modules | TypeScript Ambient Modules} | ||
*/ | ||
|
||
/** | ||
* This declaration is for importing CSS files as a string. | ||
* | ||
* This is made possible by the `?inline` query parameter in Vite, which allows | ||
* the CSS file to be imported as a string instead of being injected into a `<style>` tag. | ||
* This gives us the flexibility to use the CSS content in any way we see fit within our code. | ||
* | ||
* @see {@link https://vitejs.dev/guide/features.html#disabling-css-injection-into-the-page | Disabling CSS injection into the page} | ||
*/ | ||
declare module '*.css?inline' { | ||
const content: string; | ||
export default content; | ||
} |
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,49 @@ | ||
import { defineConfig } from 'vite'; | ||
import postcssPresetEnv from 'postcss-preset-env'; | ||
import postcssNested from 'postcss-nested'; | ||
import postcssNestedImport from 'postcss-nested-import'; | ||
import postcssDiscardComments from 'postcss-discard-comments'; | ||
|
||
export default defineConfig({ | ||
css: { | ||
postcss: { | ||
plugins: [ | ||
/** | ||
* @see https://www.npmjs.com/package/postcss-preset-env | ||
* Applies a set of CSS transformations based on the latest CSS specifications. | ||
*/ | ||
postcssPresetEnv({ stage: 1 }), | ||
/** | ||
* @see https://www.npmjs.com/package/postcss-nested | ||
* Allows you to nest style rules inside each other, similar to Sass and Less. | ||
*/ | ||
postcssNested(), | ||
/** | ||
* @see https://www.npmjs.com/package/postcss-nested-import | ||
* Enables nested @import statements in CSS. | ||
*/ | ||
postcssNestedImport(), | ||
/** | ||
* @see https://www.npmjs.com/package/postcss-discard-comments | ||
* Discards comments in your CSS files during the PostCSS process. | ||
*/ | ||
postcssDiscardComments(), | ||
], | ||
}, | ||
}, | ||
build: { | ||
lib: { | ||
formats: ['es'], | ||
entry: 'index.ts', | ||
fileName: format => `index.js`, | ||
}, | ||
rollupOptions: { | ||
external: ['lit'], | ||
output: { | ||
globals: { | ||
lit: 'lit', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); |
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 |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
"files": [ | ||
"/dist/", | ||
"/src/", | ||
"/index.ts", | ||
"/README.md", | ||
"/LICENSE", | ||
"/CHANGELOG.md", | ||
|
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 |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
"files": [ | ||
"/dist/", | ||
"/src/", | ||
"/index.ts", | ||
"/README.md", | ||
"/LICENSE", | ||
"/CHANGELOG.md", | ||
|