forked from nathancahill/split
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
44f01eb
commit 9aac228
Showing
33 changed files
with
8,166 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: github pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
|
||
- run: yarn build | ||
- run: yarn workspace split-generator run build | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./packages/split-generator/public |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
dist/ | ||
node_modules/ | ||
yarn-error.log | ||
public/bundle.* |
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,10 @@ | ||
version: 1 | ||
|
||
update_configs: | ||
- package_manager: "javascript" | ||
directory: "/" | ||
update_schedule: "live" | ||
automerged_updates: | ||
- match: | ||
update_type: "all" | ||
target_branch: master |
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,3 @@ | ||
/node_modules/* | ||
/dist/* | ||
/public/* |
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,14 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"jest": true | ||
}, | ||
"extends": ["airbnb-base", "prettier"], | ||
"rules": { | ||
"import/no-extraneous-dependencies": [ | ||
"error", | ||
{ "devDependencies": true } | ||
], | ||
"no-new": 0 | ||
} | ||
} |
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,17 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
- run: yarn install | ||
- run: yarn run test | ||
env: | ||
CI: true |
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,105 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# Next.js build output | ||
.next | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and *not* Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
public/*.js* | ||
public/*.css* | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port |
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 @@ | ||
public/ |
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 @@ | ||
# mapgrid-svelte-tailwind |
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,48 @@ | ||
{ | ||
"name": "split-generator", | ||
"private": true, | ||
"version": "1.0.0", | ||
"repository": "[email protected]:nathancahill/split.git", | ||
"author": "Nathan Cahill <[email protected]>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@fullhuman/postcss-purgecss": "^4.0.3", | ||
"@rollup/plugin-commonjs": "^18.0.0", | ||
"@rollup/plugin-node-resolve": "^11.2.1", | ||
"autoprefixer": "^10.2.5", | ||
"eslint": "^7.23.0", | ||
"eslint-config-airbnb-base": "^14.2.1", | ||
"eslint-config-prettier": "^8.1.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"jest": "^26.6.3", | ||
"postcss": "^8.2.8", | ||
"postcss-load-config": "^3.0.1", | ||
"prettier": "^2.2.1", | ||
"rollup": "^2.43.0", | ||
"rollup-plugin-css-only": "^3.1.0", | ||
"rollup-plugin-livereload": "^2.0.0", | ||
"rollup-plugin-svelte": "^7.1.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"sirv-cli": "^1.0.11", | ||
"svelte": "^3.35.0", | ||
"svelte-preprocess": "^4.7.0", | ||
"tailwindcss": "^2.0.4" | ||
}, | ||
"scripts": { | ||
"build": "NODE_ENV=production rollup -c", | ||
"watch": "rollup -cw", | ||
"format": "prettier --write \"**/*.js\" \"**/*.json\"", | ||
"lint": "eslint .", | ||
"test": "jest && yarn run lint", | ||
"serve": "sirv public --single --dev" | ||
}, | ||
"dependencies": { | ||
"@tailwindcss/forms": "^0.3.2", | ||
"less": "^4.1.1", | ||
"qs": "^6.10.1", | ||
"split-grid": "^1.0.9", | ||
"split.js": "^1.6.2", | ||
"svelte-prismjs": "^1.0.1", | ||
"svelte-spa-router": "^3.1.0" | ||
} | ||
} |
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,21 @@ | ||
/* eslint-disable global-require */ | ||
const purgecss = require('@fullhuman/postcss-purgecss')({ | ||
content: ['./src/**/*.html', './src/**/*.svelte'], | ||
|
||
safelist: [/svelte-/], | ||
|
||
defaultExtractor: content => | ||
content | ||
.match(/[A-Za-z0-9-_:./]+/g) | ||
.map(c => (c.startsWith('class:') ? c.substring(6) : c)) || [], | ||
}) | ||
|
||
const plugins = [require('tailwindcss'), require('autoprefixer')] | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
plugins.push(purgecss) | ||
} | ||
|
||
module.exports = { | ||
plugins, | ||
} |
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,8 @@ | ||
module.exports = { | ||
printWidth: 80, | ||
trailingComma: 'all', | ||
tabWidth: 4, | ||
semi: false, | ||
singleQuote: true, | ||
arrowParens: 'avoid', | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title></title> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="/bundle.css"> | ||
</head> | ||
<body> | ||
<script src="/bundle.js"></script> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,38 @@ | ||
import commonjs from '@rollup/plugin-commonjs' | ||
import resolve from '@rollup/plugin-node-resolve' | ||
import svelte from 'rollup-plugin-svelte' | ||
import livereload from 'rollup-plugin-livereload' | ||
import { terser } from 'rollup-plugin-terser' | ||
import sveltePreprocess from 'svelte-preprocess' | ||
import css from 'rollup-plugin-css-only' | ||
|
||
const prod = process.env.NODE_ENV === 'production' | ||
const watch = process.env.ROLLUP_WATCH | ||
|
||
export default { | ||
input: 'src/index.js', | ||
output: { | ||
file: 'public/bundle.js', | ||
format: 'iife', | ||
}, | ||
plugins: [ | ||
svelte({ | ||
preprocess: sveltePreprocess({ | ||
postcss: true, | ||
}), | ||
compilerOptions: { | ||
dev: !prod, | ||
}, | ||
}), | ||
css({ | ||
output: 'bundle.css', | ||
}), | ||
resolve({ | ||
dedupe: ['svelte', 'svelte/internal'], | ||
browser: true, | ||
}), | ||
commonjs(), | ||
!!watch && livereload(), | ||
!!prod && terser(), | ||
], | ||
} |
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,19 @@ | ||
<style global lang="less"> | ||
/*! purgecss start ignore */ | ||
@tailwind base; | ||
@tailwind components; | ||
/*! purgecss end ignore */ | ||
@tailwind utilities; | ||
/*! purgecss start ignore */ | ||
@import 'src/less/markdown'; | ||
/*! purgecss end ignore */ | ||
</style> | ||
|
||
<script> | ||
import Dashboard from './Dashboard.svelte' | ||
import 'prismjs/components/prism-jsx.min' | ||
</script> | ||
|
||
<Dashboard /> |
Oops, something went wrong.