Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Commit

Permalink
update for 4.21 (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
odoe authored Sep 22, 2021
1 parent f9ac7a0 commit c45cdf0
Show file tree
Hide file tree
Showing 59 changed files with 629 additions and 823 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ Commands:
arcgis create jsapi-app
```

> rollup template application
> vite template application
```sh
arcgis create jsapi-rollup-app -t rollup
arcgis create jsapi-vite-app -t vite
```

## Sample Apps
Expand All @@ -73,7 +73,7 @@ Options:
--version Show version number [boolean]
--name, -n directory and package name for the new app
--dest Directory to create the application in [default: <name>]
--type, -t A project template [choices: "jsapi". "rollup"] [default: "jsapi"]
--type, -t A project template [choices: "jsapi". "vite"] [default: "jsapi"]
-h, --help Show help [boolean]

```
Expand All @@ -87,7 +87,7 @@ Initialize a new application in current directory

Options:
--version Show version number [boolean]
--type, -t A project template [choices: "jsapi". "rollup"] [default: "jsapi"]
--type, -t A project template [choices: "jsapi". "vite"] [default: "jsapi"]
-h, --help Show help [boolean]
```

Expand Down
9 changes: 9 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const ArcGISPlugin = require('@arcgis/webpack-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const Dotenv = require('dotenv-webpack');
const TerserPlugin = require('terser-webpack-plugin');
const HtmlWebPackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const HTMLInlineCSSWebpackPlugin = require('html-inline-css-webpack-plugin').default;
const CopyPlugin = require('copy-webpack-plugin');
const { GenerateSW } = require('workbox-webpack-plugin');
74 changes: 37 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@arcgis/cli",
"version": "4.19.0",
"version": "4.21.0",
"description": "CLI to scaffold ArcGIS API for JavaScript applications",
"main": "dist/index.js",
"bin": {
Expand Down Expand Up @@ -47,30 +47,30 @@
"author": "Rene Rubalcava <[email protected]>",
"license": "Apache-2.0",
"devDependencies": {
"@babel/cli": "^7.12.10",
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.10",
"@babel/preset-typescript": "^7.12.7",
"@types/browser-sync": "^2.26.1",
"@babel/cli": "^7.15.7",
"@babel/core": "^7.15.5",
"@babel/preset-env": "^7.15.6",
"@babel/preset-typescript": "^7.15.0",
"@types/browser-sync": "^2.26.2",
"@types/chalk": "^2.2.0",
"@types/chokidar": "^2.1.3",
"@types/fibers": "^3.1.0",
"@types/jest": "^26.0.19",
"@types/node": "^14.14.25",
"@types/pify": "^5.0.0",
"@types/sass": "^1.16.0",
"@types/yargs": "^16.0.0",
"@typescript-eslint/eslint-plugin": "^4.15.0",
"@typescript-eslint/parser": "^4.15.0",
"@types/fibers": "^3.1.1",
"@types/jest": "^27.0.2",
"@types/node": "^16.9.6",
"@types/pify": "^5.0.1",
"@types/sass": "^1.16.1",
"@types/yargs": "^17.0.3",
"@typescript-eslint/eslint-plugin": "^4.31.2",
"@typescript-eslint/parser": "^4.31.2",
"cpy-cli": "^3.1.1",
"eslint": "^7.19.0",
"eslint-config-prettier": "^7.2.0",
"eslint-plugin-prettier": "^3.3.1",
"husky": "^4.3.8",
"jest": "^26.6.3",
"lint-staged": "^10.5.4",
"prettier": "^2.2.1",
"typescript": "^4.1.3"
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.2",
"jest": "^27.2.1",
"lint-staged": "^11.1.2",
"prettier": "^2.4.1",
"typescript": "^4.4.3"
},
"babel": {
"presets": [
Expand Down Expand Up @@ -111,29 +111,29 @@
"useTabs": true
},
"dependencies": {
"arcgis-js-api": "^4.18.1",
"browser-sync": "^2.26.14",
"chalk": "^4.1.0",
"chokidar": "^3.5.1",
"core-js": "^3.8.1",
"cpy": "^8.1.1",
"arcgis-js-api": "^4.20.2",
"browser-sync": "^2.27.5",
"chalk": "^4.1.2",
"chokidar": "^3.5.2",
"core-js": "^3.18.0",
"cpy": "^8.1.2",
"cross-spawn-promise": "^0.10.2",
"del": "^6.0.0",
"fibers": "^5.0.0",
"fs-extra": "^9.0.1",
"inquirer": "^7.3.3",
"fs-extra": "^10.0.0",
"inquirer": "^8.1.5",
"lodash.camelcase": "^4.3.0",
"lodash.startcase": "^4.4.0",
"ora": "^5.1.0",
"ora": "^6.0.1",
"pify": "^5.0.0",
"pkg-dir": "^4.2.0",
"pkg-dir": "^5.0.0",
"ramda": "^0.27.1",
"recursive-copy": "^2.0.11",
"regenerator-runtime": "^0.13.7",
"recursive-copy": "^2.0.13",
"regenerator-runtime": "^0.13.9",
"rimraf": "^3.0.2",
"sass": "^1.32.6",
"tslib": "^2.1.0",
"sass": "^1.42.1",
"tslib": "^2.3.1",
"watch": "^1.0.2",
"yargs": "^16.2.0"
"yargs": "^17.1.1"
}
}
4 changes: 2 additions & 2 deletions src/commands/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const create = {
type: {
alias: 't',
describe: 'A project template',
choices: ['jsapi', 'rollup'],
choices: ['jsapi', 'vite'],
demandOption: false,
default: 'jsapi',
},
Expand All @@ -44,7 +44,7 @@ const create = {
async handler(argv: CreatArgs): Promise<void> {
console.info(chalk.underline(`Creating ArcGIS project: ${argv.name}\n`));

if (argv.type === 'jsapi' || argv.type === 'rollup') {
if (argv.type === 'jsapi' || argv.type === 'vite') {
return await createApp({ argv });
} else {
console.info(chalk.red(`Unknown app template "${argv.type}.\n`));
Expand Down
2 changes: 1 addition & 1 deletion src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const init = {
type: {
alias: 't',
describe: 'A project template',
choices: ['jsapi', 'rollup'],
choices: ['jsapi', 'vite'],
demandOption: false,
default: 'jsapi',
},
Expand Down
6 changes: 3 additions & 3 deletions src/lib/copyTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type Args = {
};

const BASIC = 'templates/webpack/app';
const ROLLUP = 'templates/rollup/app';
const VITE = 'templates/vite/app';

const gitignore = `
node_modules/*
Expand All @@ -47,8 +47,8 @@ coverage/*

const copyTemplate = async (arg: Args, init = false): Promise<string> => {
let templateDirectory = BASIC;
if (arg.type === 'rollup') {
templateDirectory = ROLLUP;
if (arg.type === 'vite') {
templateDirectory = VITE;
}

let target: string;
Expand Down
3 changes: 0 additions & 3 deletions templates/rollup/app/README.md

This file was deleted.

92 changes: 0 additions & 92 deletions templates/rollup/app/package.json

This file was deleted.

43 changes: 0 additions & 43 deletions templates/rollup/app/rollup.config.js

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions templates/rollup/app/src/__mocks__/tsconfig.json

This file was deleted.

Binary file removed templates/rollup/app/src/assets/favicon.ico
Binary file not shown.
Binary file removed templates/rollup/app/src/assets/icon.png
Binary file not shown.
Empty file.
Loading

0 comments on commit c45cdf0

Please sign in to comment.