├── .github
└── workflows
│ └── main.yml
├── .gitignore
├── README.md
├── app
├── css
│ └── index.css
├── index.html
└── js
│ └── index.js
├── lighthouserc.json
├── package-lock.json
├── package.json
├── postcss.config.js
└── rollup.config.mjs
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: Lighthouse
2 | on: [push]
3 | jobs:
4 | lhci:
5 | name: CI
6 | runs-on: ubuntu-latest
7 | steps:
8 | - uses: actions/checkout@v2
9 | - name: Build
10 | run: |
11 | npm install
12 | npm run build
13 | - name: Test dist/
14 | uses: treosh/lighthouse-ci-action@v2
15 | env:
16 | LHCI_GITHUB_APP_TOKEN: ${{secrets.LHCI_GITHUB_APP_TOKEN}}
17 | with:
18 | configPath: './lighthouserc.json'
19 | temporaryPublicStorage: true
20 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | dist/
2 | node_modules/
3 | app/bundle.css
4 | app/bundle.js
5 | .DS_Store
6 | .cache
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://app.netlify.com/sites/shortstax/deploys)
2 |
3 | ### CSS
4 | [PostCSS](https://postcss.org) to **bundle**, **import from NPM, local or remote URLs**, plus [postcss-preset-env](https://preset-env.cssdb.org/) for **latest CSS features**.
5 |
6 | ### JS
7 | [Rollup](https://rollupjs.org) to **bundle**, **treeshake**, **import from NPM, local or remote URLs**, **import processed CSS**, plus [babel-preset-env](https://babeljs.io/docs/en/babel-preset-env) for **latest JS features**.
8 |
9 | ### Servers
10 | [Browsersync](https://www.browsersync.io) with all the goodies for local dev: **live reload**, **hot swap CSS**, **scroll syncing**, **remote debugging**, [etc](https://www.browsersync.io). Prod server is just a static server.
11 |
12 |
13 |
14 | > Watch me break it down on [YouTube!](https://links.argyle.ink/shortstack)
15 |
16 |
17 |
18 | ## Getting Started
19 | [use this as a Github template](https://github.com/argyleink/shortstack/generate)
20 |
21 | OR
22 |
23 | #### Clone Shortstack into a new folder
24 | 1. `mkdir new-project-name && cd $_`
25 | 1. `git clone --depth=1 https://github.com/argyleink/shortstack.git . && rm -rf ./.git`
26 |
27 | OR (essentially the same thing with npx+degit)
28 |
29 | 1. `npx degit argyleink/shortstack#main`
30 |
31 | #### Install tools and spin it up
32 | 1. `npm i`
33 | 1. `npm start`
34 |
35 |
36 |
37 | ## Development
38 | Running `npm start` runs Browsersync, Rollup and Postcss concurrently, watching changes to your files in `./app` and refreshes connected browsers.
39 |
40 | ## Production
41 | Running `npm run build` compiles and minifies your code in `app` and outputs the optimised result to a folder called `dist` that's ready for static hosting.
42 |
43 | Running `npm run production` will build your project and start a server at `dist`.
44 |
--------------------------------------------------------------------------------
/app/css/index.css:
--------------------------------------------------------------------------------
1 | /*
2 | (bundle from remote urls)
3 | @import '//css-from-url';
4 |
5 | (bundle from npm)
6 | @import 'css-from-npm';
7 |
8 | (bundle from local)
9 | @import 'localfile.css'
10 |
11 | (PresetENV)
12 | CSS powers @ https://preset-env.cssdb.org/features
13 | */
14 |
15 | :root {
16 | --surface: lch(10 0 0);
17 | --text: lch(80 0 0);
18 | --brand: lch(64 40 347);
19 |
20 | @media (prefers-color-scheme: light) {
21 | --surface: lch(98 0 0);
22 | --text: lch(30 0 0);
23 | --brand: lch(65 64 350);
24 |
25 | @media (dynamic-range: high) {
26 | --brand: color(display-p3 1 0 1);
27 | }
28 | }
29 | }
30 |
31 | html {
32 | block-size: 100%;
33 | inline-size: 100%;
34 | }
35 |
36 | body {
37 | min-block-size: 100%;
38 | min-inline-size: 100%;
39 | box-sizing: border-box;
40 |
41 | display: grid;
42 | place-content: center;
43 | gap: 2ch;
44 |
45 | background: var(--surface);
46 | color: var(--text);
47 | font-family: system-ui, sans-serif;
48 | }
49 |
50 | @media (orientation: landscape) {
51 | body {
52 | grid-auto-flow: column;
53 | }
54 | }
55 |
56 | body,p,ul,dl,dd,dt,figure,
57 | h1,h2,h3,h4,h5,h6,small {
58 | margin: 0;
59 | }
60 |
61 | a {
62 | color: color(display-p3 0 .5 1);
63 |
64 | &:visited {
65 | color: color(display-p3 .5 0 1);
66 | }
67 | }
68 |
69 | h1,h2,h3,h4,h5,h6 {
70 | line-height: 1.5;
71 | max-inline-size: 25ch;
72 | }
73 |
74 | p {
75 | line-height: 2;
76 | font-size: 1.25rem;
77 | font-weight: 300;
78 | max-inline-size: 45ch;
79 | }
80 |
81 | ::selection {
82 | background-color: var(--brand);
83 | }
84 |
--------------------------------------------------------------------------------
/app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |