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

Commit

Permalink
update rollup for 4.19
Browse files Browse the repository at this point in the history
  • Loading branch information
odoe committed Apr 20, 2021
1 parent 5415106 commit 9c00a79
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 24 deletions.
8 changes: 1 addition & 7 deletions templates/basic/widget/WidgetName.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { property, subclass } from '@arcgis/core/core/accessorSupport/decorators';

/**
* renderable will be depreciated (possibly removed?) in 4.19 as
* all @property() decorated properties will be watched
*/
import { renderable, tsx } from '@arcgis/core/widgets/support/widget';
import { tsx } from '@arcgis/core/widgets/support/widget';

import Widget from '@arcgis/core/widgets/Widget';

Expand Down Expand Up @@ -38,13 +34,11 @@ export default class <%name%> extends Widget {
@property({
aliasOf: 'viewModel.name',
})
@renderable()
name = '';

@property({
type: <%name%>ViewModel,
})
@renderable()
viewModel = new <%name%>ViewModel();

constructor(properties?: <%name%>Properties) {
Expand Down
18 changes: 18 additions & 0 deletions templates/rollup/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# override cli .gitignore
# can be removed from scaffolded app
!src/assets

node_modules/*
.vscode/*
build/*
dist/*
html-report/*
~tmp/*
.baseDir*
.tsdrc
.tscache
npm-debug.log
coverage-final.*
*.env
coverage/*
debug.log
10 changes: 5 additions & 5 deletions templates/rollup/app/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"private": true,
"dependencies": {
"@arcgis/core": "~4.18.0"
"@arcgis/core": "~4.19.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^15.0.0",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-html": "^0.2.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-node-resolve": "^11.2.1",
"@rollup/plugin-typescript": "^8.0.0",
"@types/jest": "^26.0.18",
"@typescript-eslint/eslint-plugin": "^4.8.1",
"@typescript-eslint/parser": "^4.8.1",
"eslint": "^7.15.0",
"eslint-config-prettier": "^6.15.0",
"eslint-config-prettier": "^8.2.0",
"eslint-plugin-prettier": "^3.2.0",
"husky": "^4.3.5",
"husky": "^6.0.0",
"jest": "^26.6.3",
"lint-staged": "^10.5.3",
"ncp": "^2.0.0",
Expand Down
9 changes: 1 addition & 8 deletions templates/rollup/app/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import postcss from 'rollup-plugin-postcss'
import resolve from '@rollup/plugin-node-resolve';
import { terser } from 'rollup-plugin-terser';
import typescript from '@rollup/plugin-typescript';
// import html from '@rollup/plugin-html';

import fs from 'fs';
import path from 'path';
Expand All @@ -14,14 +13,9 @@ import path from 'path';
// `npm run dev` -> `production` is false
const production = !process.env.ROLLUP_WATCH;

// const src = (...args) => path.join('src', ...args);

// const indexPage = fs.readFileSync(path.resolve(__dirname, 'src/index.html'), 'utf-8');

export default {
input: 'src/index.ts',
output: {
// entryFileNames: '[name].js',
chunkFileNames: 'chunks/[name].[hash].js',
dir: 'dist',
format: 'es'
Expand All @@ -40,8 +34,7 @@ export default {
copy({
targets: [
{ src: 'src/index.html', dest: 'dist/' },
{ src: 'src/oauth-callback.html', dest: 'dist/' },
{ src: 'node_modules/@arcgis/core/assets/', dest: 'dist/' }
{ src: 'src/oauth-callback.html', dest: 'dist/' }
],
copyOnce: true
})
Expand Down
Binary file added templates/rollup/app/src/assets/favicon.ico
Binary file not shown.
Binary file added templates/rollup/app/src/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions templates/rollup/app/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta name="mobile-web-app-capable" content="yes" />
<link rel="stylesheet" href="assets/esri/themes/light/main.css" />
<link href="index.css" rel="stylesheet">
<link rel="stylesheet" href="https://js.arcgis.com/4.19/esri/themes/light/main.css" />
<link href="index.css" rel="stylesheet">
<title>ArcGIS Template Application</title>
<script>
// Check that service workers are registered
Expand Down
4 changes: 2 additions & 2 deletions templates/webpack/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"license": "Apache-2.0",
"dependencies": {
"@arcgis/core": "next",
"@arcgis/webpack-plugin": "^4.19.0-next20210225",
"@arcgis/core": "~4.19.0",
"@arcgis/webpack-plugin": "~4.19.0",
"@babel/polyfill": "^7.12.1"
},
"devDependencies": {
Expand Down

0 comments on commit 9c00a79

Please sign in to comment.