- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
Feature/initial setup #1
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
          
     Merged
      
      
    
  
     Merged
                    Changes from 11 commits
      Commits
    
    
            Show all changes
          
          
            22 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      641ad5f
              
                feat: add output-target.ts
              
              
                MoritzEckert c84584d
              
                feat: add config files
              
              
                MoritzEckert ea7b040
              
                feat: add github workflows
              
              
                MoritzEckert 5d32f09
              
                feat: add package-lock.json
              
              
                MoritzEckert 47b91e2
              
                feat: add README.md
              
              
                MoritzEckert 249aca3
              
                feat: adjust package.json
              
              
                MoritzEckert b8a512e
              
                feat: add dependencies
              
              
                MoritzEckert db53c6b
              
                feat: add dependencies
              
              
                MoritzEckert d2b8e2b
              
                feat: change version and add build scripts
              
              
                MoritzEckert ce13cb3
              
                feat: change tsconfig
              
              
                MoritzEckert 2235c60
              
                feat: add dist
              
              
                MoritzEckert efa4718
              
                feat: raise actions/setup-node version to 4
              
              
                MoritzEckert d18bf66
              
                feat: rename Iron to iron
              
              
                MoritzEckert 581df2f
              
                feat: adjust README.md
              
              
                MoritzEckert ef0c4a6
              
                feat: remove unnecessary plugins or move them to peerDependencies
              
              
                MoritzEckert 36cfc4f
              
                feat: rename copyFiles to injectUiExtend
              
              
                MoritzEckert 41839a8
              
                feat: use const instead of var and Types instead of JsDoc
              
              
                MoritzEckert 3ff5e51
              
                feat: update package-lock.json
              
              
                MoritzEckert 14fce26
              
                feat: remove patternlab-config-build
              
              
                MoritzEckert 28c1b93
              
                feat: fix spelling
              
              
                MoritzEckert 770b12b
              
                feat: rename feat: rename PatternlabOutput to patternLabOutputTarget …
              
              
                MoritzEckert c2e8297
              
                feat: make pattern lab a peerDependency
              
              
                MoritzEckert File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or 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 @@ | ||
| dist/** -diff linguist-generated=true | 
  
    
      This file contains hidden or 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,11 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: github-actions | ||
| directory: / | ||
| schedule: | ||
| interval: daily | ||
|  | ||
| - package-ecosystem: npm | ||
| directory: / | ||
| schedule: | ||
| interval: daily | 
  
    
      This file contains hidden or 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,42 @@ | ||
| name: Check dist/ | ||
|  | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths-ignore: | ||
| - '**.md' | ||
| pull_request: | ||
| paths-ignore: | ||
| - '**.md' | ||
| workflow_dispatch: | ||
| merge_group: | ||
|  | ||
| jobs: | ||
| check-dist: | ||
| runs-on: ubuntu-latest | ||
|  | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|  | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version-file: '.nvmrc' | ||
| cache: 'npm' | ||
| cache-dependency-path: 'package-lock.json' | ||
|  | ||
| - name: Install dependencies | ||
| run: npm ci | ||
|  | ||
| - name: Rebuild the dist/ directory | ||
| run: | | ||
| npm run build | ||
| - name: Compare the expected and actual dist/ directories | ||
| run: | | ||
| if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | ||
| echo "Detected uncommitted changes after build. See status below:" | ||
| git diff | ||
| exit 1 | ||
| fi | ||
  
    
      This file contains hidden or 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,32 @@ | ||
| name: Publish package to GitHub Packages | ||
|  | ||
| on: | ||
| release: | ||
| types: [published] | ||
|  | ||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
|  | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|  | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|  | ||
| - name: Setup Node.js and set registry to GitHub Packages | ||
| uses: actions/setup-node@v3 | ||
|         
                  MoritzEckert marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| with: | ||
| node-version-file: '.nvmrc' | ||
| cache: 'npm' | ||
| cache-dependency-path: 'package-lock.json' | ||
| registry-url: 'https://registry.npmjs.org' | ||
|  | ||
| - name: Install dependencies | ||
| run: npm ci | ||
|  | ||
| - name: Publish package to GitHub Packages | ||
| run: npm publish | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
  
    
      This file contains hidden or 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,2 @@ | ||
| .idea | ||
| node_modules | 
  
    
      This file contains hidden or 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,6 @@ | ||
| .github | ||
| .gitattributes | ||
| .nvmrc | ||
| .prettierignore | ||
| .prettierrc.json | ||
| tsconfig.json | 
  
    
      This file contains hidden or 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 @@ | ||
| lts/Iron | ||
|         
                  MoritzEckert marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
  
    
      This file contains hidden or 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,2 @@ | ||
| dist/ | ||
| node_modules/ | 
  
    
      This file contains hidden or 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,10 @@ | ||
| { | ||
| "printWidth": 120, | ||
| "tabWidth": 2, | ||
| "useTabs": false, | ||
| "semi": false, | ||
| "singleQuote": true, | ||
| "trailingComma": "none", | ||
| "bracketSpacing": false, | ||
| "arrowParens": "avoid" | ||
| } | 
  
    
      This file contains hidden or 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 | 
|---|---|---|
| @@ -1 +1,73 @@ | ||
| # stencil-styleguide-output-target | ||
| # @netlogix/stencil-styleguide-output-target | ||
|  | ||
| A stencil output target which also builds Patternlab and processes scss | ||
|         
                  MoritzEckert marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
|  | ||
| ## Usage | ||
|  | ||
| To use this output target, add it to your `stencil.config.ts`: | ||
|  | ||
| ```typescript | ||
| import {Config, } from '@stencil/core'; | ||
|         
                  MoritzEckert marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| import { sass } from '@stencil/sass'; | ||
| import watchGlobs from 'rollup-plugin-watch-globs'; | ||
|         
                  MoritzEckert marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| import {PatternlabOutput} from "./patternlab"; | ||
|         
                  MoritzEckert marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| import postcss from "rollup-plugin-postcss"; | ||
|  | ||
| export const config: Config = { | ||
| namespace: 'stencil', | ||
| srcDir: 'source/script', | ||
| watchIgnoredRegex: /dependencyGraph.json/, // important for watching for changes in patternlab | ||
| outputTargets: [ | ||
| // ... other output targets | ||
| PatternlabOutput({}), | ||
|         
                  MoritzEckert marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| // ... | ||
| ], | ||
| devServer: { | ||
| openBrowser: false, | ||
| reloadStrategy: "pageReload", // important for hot reload to work with patternlab | ||
| root: 'public', | ||
| }, | ||
| plugins: [ | ||
| sass(), | ||
| ], | ||
| // ... | ||
| }; | ||
| ``` | ||
| ## Configuration | ||
| The PatternlabOutput function takes an optional configuration object with the following properties: | ||
|  | ||
| `rollupOptions`: | ||
|  | ||
| An object with rollup options to be merged with the default options. | ||
|  | ||
| Default: | ||
| ``` | ||
| rollupOptions: { | ||
| input: 'source/scss/style.scss', | ||
| plugins: [ | ||
| postcss({ | ||
| modules: true, | ||
| extract: true | ||
| }) | ||
| ] | ||
| }, | ||
| ``` | ||
| # | ||
| `rollupOutputOptions`: | ||
|  | ||
| An object with rollup output options to be merged with the default options. | ||
|  | ||
| Default: | ||
| ``` | ||
| rollupOutputOptions: { | ||
| name: 'style', | ||
| dir: './public/css', | ||
| format: 'es' | ||
| }, | ||
|         
                  MoritzEckert marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| ``` | ||
| # | ||
| `sourceDir`: the directory which will be watched. Default: `source/**/*` | ||
|  | ||
|  | ||
| ## License | ||
| This package is licensed under the MIT license. | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
      
      Oops, something went wrong.
      
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.