Skip to content

Commit

Permalink
Create version 1.0.0 for public release (#2)
Browse files Browse the repository at this point in the history
This commit contains all of the features and tests for the initial
public release of Structured Elements. It has been bundled into a single
commit on 'main' for the sake of tidiness. We intend to use pull
requests for all changes, so it seems reasonable to start with one.

For a more detailed breakdown of the features included in this version,
take a look at `README.md` or browse the code from this commit. The main
index file from `src/index.ts` might be a helpful place to start.
  • Loading branch information
lukearndt authored Sep 26, 2024
1 parent 8f316b6 commit 0a0eac5
Show file tree
Hide file tree
Showing 135 changed files with 1,561,188 additions and 1 deletion.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
65 changes: 65 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
`eslint:recommended`,
`plugin:@typescript-eslint/recommended`,
`prettier`,
],
parser: `@typescript-eslint/parser`,
parserOptions: {
ecmaVersion: 12,
sourceType: `module`,
},
plugins: [`@typescript-eslint`, `simple-import-sort`, `unused-imports`],
rules: {
"no-dupe-class-members": `error`,
curly: [`error`, `all`],
"arrow-body-style": [`error`, `always`],
"no-unused-vars": `off`,
"no-console": `off`,
"@typescript-eslint/consistent-type-imports": `error`,
"@typescript-eslint/explicit-module-boundary-types": `off`,
"@typescript-eslint/no-namespace": `off`,
"@typescript-eslint/no-empty-function": `off`,
"@typescript-eslint/no-unused-vars": `off`,
"@typescript-eslint/quotes": [`error`, `backtick`],
"@typescript-eslint/prefer-literal-enum-member": `error`,
"unused-imports/no-unused-imports": `error`,
"unused-imports/no-unused-vars": [
`off`,
{
vars: `all`,
varsIgnorePattern: `^_`,
args: `after-used`,
argsIgnorePattern: `^_`,
},
],
"simple-import-sort/exports": `error`,
"simple-import-sort/imports": [
`error`,
{
groups: [
// ext library & side effect imports
[`^.+\\.s?css$`],
[`^@/`],
[
`^\\./?$`,
`^\\.(?!/?$)`,
`^\\.\\./?$`,
`^\\.\\.(?!/?$)`,
`^\\.\\./\\.\\./?$`,
`^\\.\\./\\.\\.(?!/?$)`,
`^\\.\\./\\.\\./\\.\\./?$`,
`^\\.\\./\\.\\./\\.\\.(?!/?$)`,
],
[`^@/types`], // other that didn't fit in
[`^`],
],
},
],
},
}
73 changes: 73 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: CI

on:
push:
branches:
- main
pull_request:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm install
- run: npm run build

lint:
runs-on: ubuntu-latest

env:
CI: true
NODE_ENV: test

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm install
- run: npm run lint-check

test:
runs-on: ubuntu-latest

env:
CI: true
NODE_ENV: test

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm install
- run: npm run test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
/dist
node_modules
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.eslintignore
.eslintrc.js
.github/
.prettierrc.js
jest.config.ts
test/
tsconfig.build.json
tsconfig.json
6 changes: 6 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
semi: false,
singleQuote: false,
tabWidth: 2,
trailingComma: `all`,
}
3 changes: 3 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Structured Elements is an Open Source project licensed under the terms of
the LGPLv3 license. Please see <http://www.gnu.org/licenses/lgpl-3.0.html>
for license text.
Loading

0 comments on commit 0a0eac5

Please sign in to comment.