Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Package Setup #440

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,17 @@ jobs:
- name: Build Storybook
run: yarn storybook:build

# @see https://github.com/marketplace/actions/github-status
- name: Check GitHub Pages status
uses: crazy-max/ghaction-github-status@v3
uses: crazy-max/ghaction-github-status@v4
with:
pages_threshold: major_outage

overall_threshold: minor
pages_threshold: partial_outage

# @see https://github.com/marketplace/actions/github-pages
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v3
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: storybook-static
Expand Down
9 changes: 9 additions & 0 deletions packages/components/outline-core-alert/LICENSE.md
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.
himerus marked this conversation as resolved.
Show resolved Hide resolved
24 changes: 24 additions & 0 deletions packages/components/outline-core-alert/index.html
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>
7 changes: 6 additions & 1 deletion packages/components/outline-core-alert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
"files": [
"/dist/",
"/src/",
"/index.ts",
"/README.md",
"/LICENSE",
"/CHANGELOG.md",
"/package.json",
"!/dist/tsconfig.build.tsbuildinfo"
],
"author": "Phase2 Technology",
Expand All @@ -29,7 +34,7 @@
"homepage": "https://github.com/phase2/outline/tree/next/packages/components/outline-core-alert",
"license": "BSD-3-Clause",
"scripts": {
"build": "node ../../../scripts/build.js",
"build": "node ../../../scripts/bundle.js",
"package": "yarn publish"
},
"publishConfig": {
Expand Down
22 changes: 22 additions & 0 deletions packages/components/outline-core-alert/src/component.d.ts
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;
}
49 changes: 49 additions & 0 deletions packages/components/outline-core-alert/vite.config.js
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',
},
},
},
},
});
1 change: 1 addition & 0 deletions packages/components/outline-core-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"files": [
"/dist/",
"/src/",
"/index.ts",
"/README.md",
"/LICENSE",
"/CHANGELOG.md",
Expand Down
1 change: 1 addition & 0 deletions packages/controllers/adopted-stylesheets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"files": [
"/dist/",
"/src/",
"/index.ts",
"/README.md",
"/LICENSE",
"/CHANGELOG.md",
Expand Down