Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeTschudi committed Nov 2, 2022
2 parents 3dc2e8e + e4b7767 commit 212bcd9
Show file tree
Hide file tree
Showing 637 changed files with 230,030 additions and 6,119 deletions.
70 changes: 70 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"root": true,
"env": {
"jest/globals": true
},
"extends": [
"plugin:@esri/calcite-components/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:jest/recommended",
"prettier"
],
"ignorePatterns": ["assets", "test", "json-editor"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig-eslint.json",
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["@esri/calcite-components", "@typescript-eslint", "eslint-plugin-react", "jest", "prettier", "unicorn"],
"rules": {
"@esri/calcite-components/strict-boolean-attributes": "off",
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/explicit-module-boundary-types": [
"error",
{
"allowArgumentsExplicitlyTypedAsAny": true,
"allowedNames": [
"connectedCallback",
"disconnectedCallback",
"componentWillRender",
"componentDidRender",
"componentWillLoad",
"componentDidLoad",
"componentWillUpdate",
"componentDidUpdate",
"render"
]
}
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"curly": "error",
"jest/expect-expect": "off",
"jest/no-export": "warn",
"lines-between-class-members": ["error", "always"],
"no-multiple-empty-lines": ["error", { "max": 1 }],
"no-unneeded-ternary": "error",
"no-unused-vars": "off",
"react/jsx-no-bind": [ "error", { "ignoreDOMComponents": true } ],
"react/jsx-sort-props": "error",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/self-closing-comp": "error",
"unicorn/prefer-ternary": "error"
},
"settings": {
"react": {
"version": "detect"
}
}
}
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Linting

on:
push:
branches: [ develop, master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop, master ]

jobs:
steps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- uses: actions/setup-node@v1
with:
node-version: "16.x"

- name: Install Node.js dependencies
run: npm ci --ignore-scripts

- name: Lint
shell: bash
run: |
npx eslint --ext .ts,.tsx src/components src/utils
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,15 @@ $RECYCLE.BIN/
Thumbs.db
UserInterfaceState.xcuserstate
.env

# Tools, notes, outputs
__*.*
__*
.vscode/
coverage/

# Temporary build products
src/**/*.js
!src/**/assets/**/*.js
!src/demos/**/*.js
arcgis-pdf-creator/
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package.json
package-lock.json
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
language: node_js
node_js:
- "16"
cache: npm
before_script:
- export NODE_OPTIONS=--max_old_space_size=32768
script:
- npm run test
env:
- MOZ_HEADLESS=1
addons:
chrome: stable
firefox: latest
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog

All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.1.4] - November 2nd 2022

[0.1.4]: https://github.com/Esri/solution.js/compare/3dc2e8e89cd42b447420b2c0cba988738d0c7195...v0.1.4 "v0.1.4"
[Unreleased]: https://github.com/Esri/solution.js/compare/v0.1.4...HEAD "Unreleased Changes"

7 changes: 7 additions & 0 deletions Publishing to npmjs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Publishing solutions-components to npmjs

1. Update version in package.json
2. Run `npm install` to update package-lock.json
3. Add entry for version in CHANGELOG.md
4. Commit and push the changes
5. Run `npm run release:publish`
39 changes: 36 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
[![npm status][npm-img]][npm-url]
[![Build status][travis-img]][travis-url]
[![Apache 2.0 licensed][license-img]][license-url]

[npm-img]: https://img.shields.io/npm/v/@esri/solutions-components.svg?style=round-square&color=blue
[npm-url]: https://www.npmjs.com/package/@esri/solutions-components
[travis-img]: https://img.shields.io/travis/Esri/solutions-components/develop.svg
[travis-url]: https://travis-ci.org/Esri/solutions-components
[license-img]: https://img.shields.io/badge/license-Apache%202.0-blue.svg
[license-url]: #license

Expand All @@ -13,38 +19,65 @@ Supported browsers are the latest versions of Google Chrome, Apple Safari, Mozil

## Getting Started

The repository is set up to use [Volta](https://docs.volta.sh/guide/getting-started) for standardizing the versions of NodeJS and npm. Please install and use this app to get the supported versions.

The repository uses [StencilJS](https://stenciljs.com/) to manage web component development; the project is a `web_component` project type.

Set up:

```bash
npm install
```

To interactively transpile components and update the display of src/index.html:
To interactively transpile components and update the display of src/index.html via http://localhost:3333/src:

```bash
npm start
```
Note this feature excessively caches; sometimes you have to rebuild manually and force a refresh.

One can also run index.html in the top-level directory, which is the same as src/index.html but for the path to the `dist` directory.

To add a component, run
```bash
npm run generate
```
with the new component's name as an argument (or specify the name when prompted).

To build the component for debugging, run:

```bash
npm run build:debug
```

To build the component for production, run:

```bash
npm run build
```

To run the unit tests for the components, run:
To run the unit tests for the components, stop automatic compilation (e.g., Visual Studio) and run:

```bash
npm run clean:src
npm test
```

To publish to npm and GitHub,
1. Edit package.json to have the new version number
2. Run `npm install`
3. Edit CHANGELOG.md to show the new release number and connect it to previous releases
4. Commit and push changes to GitHub
5. Run: `npm release:publish`


## Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

## Licensing

Copyright 2021 Esri
Copyright 2022 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Expand Down
12 changes: 12 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
rem Builds the repository

call node --version
call npm --version

call npm install
call npm run build

echo Built %date% %time% >dist\solutions-components_commit.txt
git rev-parse --abbrev-ref HEAD >>dist\solutions-components_commit.txt
git log -1>>dist\solutions-components_commit.txt

9 changes: 9 additions & 0 deletions buildDebug.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
rem Builds the repository

call npm install
call npm run build:debug

echo Built %date% %time% >dist\solutions-components_commit.txt
git rev-parse --abbrev-ref HEAD >>dist\solutions-components_commit.txt
git log -1>>dist\solutions-components_commit.txt

6 changes: 6 additions & 0 deletions cleanSrc.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off
mkdir __trash >nul
del/q src\index.js 2>nul
robocopy src\components __trash *.js /s /mov /create /xd assets >nul
robocopy src\utils __trash *.js /s /mov /create /xd assets >nul
rmdir /s/q __trash
Binary file added esri-solutions-components-0.0.1.tgz
Binary file not shown.
Loading

0 comments on commit 212bcd9

Please sign in to comment.