Skip to content

Commit

Permalink
Merge pull request sass#1 from oddbird/dev-env
Browse files Browse the repository at this point in the history
Add basic 11ty dev environment.
  • Loading branch information
jgerigmeyer committed Jan 11, 2023
2 parents d79cec4 + 99004f0 commit 8281ece
Show file tree
Hide file tree
Showing 344 changed files with 19,585 additions and 282 deletions.
86 changes: 86 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
// See https://containers.dev/implementors/json_reference/ for format details.
{
"name": "sass-site",
"dockerComposeFile": ["../docker-compose.yml", "./docker-compose.dev.yml"],
"service": "web",
"workspaceFolder": "/app",
"shutdownAction": "stopCompose",
"extensions": [
"csstools.postcss",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"formulahendry.auto-rename-tag",
"naumovs.color-highlight",
"sissel.shopify-liquid",
"stkb.rewrap",
"stylelint.vscode-stylelint",
"syler.sass-indented",
"tyriar.sort-lines",
"xabikos.javascriptsnippets"
],
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash"
}
},
"terminal.integrated.defaultProfile.linux": "bash",
"editor.bracketPairColorization.enabled": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"eslint.validate": ["javascript", "typescript"],
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"stylelint.validate": ["css", "scss", "less", "postcss"],
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"javascript.suggestionActions.enabled": false,
"typescript.preferences.quoteStyle": "single",
"typescript.tsdk": "node_modules/typescript/lib",
"[javascript]": {
"editor.rulers": [80]
},
"[markdown]": {
"editor.rulers": [80]
},
"[typescript]": {
"editor.rulers": [80]
},
"[scss]": {
"editor.rulers": [80],
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": true
}
},
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
".coverage": true,
"coverage": true,
"htmlcov": true,
".tags": true,
".cache": true,
".vscode": true,
"collected-assets": true,
"staticfiles": true,
"**/*.egg-info": true
},
"search.exclude": {
"**/*.css.map": true,
"**/*.js.map": true,
"**/node_modules": true,
".yarn/": true,
"_site/": true,
"assets/dist/": true,
"yarn-debug.log": true,
"yarn-error.log": true,
"yarn.lock": true
}
}
}
13 changes: 13 additions & 0 deletions .devcontainer/docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '3'

services:
web:
volumes:
- .:/app:delegated
- vscode-server:/root/.vscode-server:cached
- /var/run/docker.sock:/var/run/docker.sock:cached
# Override command to prevent container crashing if webpack build exits
command: sleep infinity

volumes:
vscode-server: {}
67 changes: 67 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
**/*.DS_Store
**/*.cover
**/*.crt
**/*.css.map
**/*.dump
**/*.js.map
**/*.key
**/*.log
**/*.manifest
**/*.md
**/*.mo
**/*.orig
**/*.pot
**/*.rst
**/*.spec
**/*.sql
**/*.swo
**/*.swp
**/*~
**/Dockerfile
.cache
.coverage
.coverage.*
.devcontainer/
.dockerignore
.git
.github/
.hypothesis/
.idea/
.installed.cfg
.livereload
.nvmrc
.nyc_output/
.ropeproject
.vscode/
.yarnrc
ENV/
build/
celerybeat-schedule
coverage.xml
coverage/
derrick
dist/
docker-compose.yml
docs/_build/
downloads/
dump.rdb
env.example
env/
heroku.yml
htmlcov/
lib64/
node_modules/
nosetests.xml
npm-debug.log
parts/
pip-delete-this-directory.txt
pip-log.txt
postgres/
sdist/
staticfiles/
var/
venv/
wheels/
yarn-error.log

!STYLEGUIDE.rst
25 changes: 25 additions & 0 deletions .eleventy.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'use strict';

/** @param {import('@11ty/eleventy').UserConfig} eleventyConfig */
module.exports = (eleventyConfig) => {
eleventyConfig.addPassthroughCopy('source/assets/dist');
eleventyConfig.addPassthroughCopy('source/assets/img');
eleventyConfig.addPassthroughCopy('source/favicon.ico');

eleventyConfig.addWatchTarget('source/assets/dist');
eleventyConfig.addWatchTarget('source/assets/img');

eleventyConfig.setLiquidOptions({
jsTruthy: true,
});
eleventyConfig.setUseGitIgnore(false);

// settings
return {
dir: {
input: 'source',
includes: '_includes',
layouts: '_layouts',
},
};
};
14 changes: 14 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
!.*
.git/
.vscode/
.yarn/
.yarnrc
.yarnrc.yml
/_site/
/old_source/
coverage/
node_modules/
source/assets/dist/
source/assets/js/vendor/**
!source/assets/js/vendor/index.js
source/assets/sass/vendor/
32 changes: 32 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
warnOnUnsupportedTypeScriptVersion: false,
},
plugins: ['@typescript-eslint', 'simple-import-sort'],
settings: {
'import/resolver': {
typescript: true,
},
},
rules: {
'import/order': 0,
'simple-import-sort/imports': 1,
'no-console': 1,
'no-warning-comments': [1, { terms: ['todo', 'fixme', '@@@'] }],
},
};
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: weekly
time: '04:00'
timezone: America/New_York
52 changes: 0 additions & 52 deletions .github/workflows/ci.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Lint & Test

on:
push:
pull_request:
types: [reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# test:
# name: Test
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version-file: .nvmrc
# cache: yarn
# - name: Install dependencies
# run: yarn install --immutable
# - name: Test
# run: yarn test

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: yarn
- name: Install dependencies
run: yarn install --immutable
- name: Lint
run: yarn lint:ci
Loading

0 comments on commit 8281ece

Please sign in to comment.