Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
168 changes: 168 additions & 0 deletions buildDEV.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
rem Builds all packages and demos in dev mode (no minification, with source maps, no tests, no lint)
rem Use this for browser debugging. The resulting bundles will be unminified and include source maps.

call node --version
call npm --version

rem Install all demos first so that npm install can symlink the packages
pushd demos\compareJSON
call npm install
popd

pushd demos\compareSolutions
call npm install
popd

pushd demos\copyItemInfo
call npm install
popd

pushd demos\copySolutions
call npm install
popd

pushd demos\createSolution
call npm install
popd

pushd demos\deleteSolution
call npm install
popd

pushd demos\deploySolution
call npm install
popd

pushd demos\getItemInfo
call npm install
popd

pushd demos\implementedTypes
call npm install
popd

pushd demos\recreateSolution
call npm install
popd

pushd demos\reuseDeployedItems
call npm install
popd

pushd demos\verifySolution
call npm install
popd

rem Install root and build all packages with source maps enabled
call npm install

rem Build packages (ESM + CJS) — pass dev-only compiler overrides
call npm run build:esm -- -- --sourceMap --declarationMap
call npm run build:cjs -- -- --sourceMap --declarationMap

call commit-stamp.bat

rem Delete dist package.json files (root, esm, and cjs) so that webpack does not
rem treat the compiled output as strict ESM. The dist/esm/package.json contains
rem {"type":"module"}, which forces webpack to require explicit .js extensions
rem on every relative import — but the TypeScript output uses extensionless
rem paths, so resolution fails. The standard build.bat deletes these for the
rem same reason.
del/q packages\common\dist\package.json 2>nul
del/q packages\common\dist\cjs\package.json 2>nul
del/q packages\common\dist\esm\package.json 2>nul
del/q packages\creator\dist\package.json 2>nul
del/q packages\creator\dist\cjs\package.json 2>nul
del/q packages\creator\dist\esm\package.json 2>nul
del/q packages\deployer\dist\package.json 2>nul
del/q packages\deployer\dist\cjs\package.json 2>nul
del/q packages\deployer\dist\esm\package.json 2>nul
del/q packages\feature-layer\dist\package.json 2>nul
del/q packages\feature-layer\dist\cjs\package.json 2>nul
del/q packages\feature-layer\dist\esm\package.json 2>nul
del/q packages\file\dist\package.json 2>nul
del/q packages\file\dist\cjs\package.json 2>nul
del/q packages\file\dist\esm\package.json 2>nul
del/q packages\form\dist\package.json 2>nul
del/q packages\form\dist\cjs\package.json 2>nul
del/q packages\form\dist\esm\package.json 2>nul
del/q packages\group\dist\package.json 2>nul
del/q packages\group\dist\cjs\package.json 2>nul
del/q packages\group\dist\esm\package.json 2>nul
del/q packages\hub-types\dist\package.json 2>nul
del/q packages\hub-types\dist\cjs\package.json 2>nul
del/q packages\hub-types\dist\esm\package.json 2>nul
del/q packages\simple-types\dist\package.json 2>nul
del/q packages\simple-types\dist\cjs\package.json 2>nul
del/q packages\simple-types\dist\esm\package.json 2>nul
del/q packages\storymap\dist\package.json 2>nul
del/q packages\storymap\dist\cjs\package.json 2>nul
del/q packages\storymap\dist\esm\package.json 2>nul
del/q packages\velocity\dist\package.json 2>nul
del/q packages\velocity\dist\cjs\package.json 2>nul
del/q packages\velocity\dist\esm\package.json 2>nul
del/q packages\viewer\dist\package.json 2>nul
del/q packages\viewer\dist\cjs\package.json 2>nul
del/q packages\viewer\dist\esm\package.json 2>nul
del/q packages\web-experience\dist\package.json 2>nul
del/q packages\web-experience\dist\cjs\package.json 2>nul
del/q packages\web-experience\dist\esm\package.json 2>nul
del/q packages\web-tool\dist\package.json 2>nul
del/q packages\web-tool\dist\cjs\package.json 2>nul
del/q packages\web-tool\dist\esm\package.json 2>nul
del/q packages\workflow\dist\package.json 2>nul
del/q packages\workflow\dist\cjs\package.json 2>nul
del/q packages\workflow\dist\esm\package.json 2>nul

rem Build all demos in development mode (unminified, readable)
pushd demos\compareJSON
call npx webpack --mode=development
popd

pushd demos\compareSolutions
call npx webpack --mode=development
popd

pushd demos\copyItemInfo
call npx webpack --mode=development
popd

pushd demos\copySolutions
call npx webpack --mode=development
popd

pushd demos\createSolution
call npx webpack --mode=development
popd

pushd demos\deleteSolution
call npx webpack --mode=development
popd

pushd demos\deploySolution
call npm run prebuild
call npx webpack --mode=development
popd

pushd demos\getItemInfo
call npx webpack --mode=development
popd

pushd demos\implementedTypes
call npx webpack --mode=development
popd

pushd demos\recreateSolution
call npx webpack --mode=development
popd

pushd demos\reuseDeployedItems
call npx webpack --mode=development
popd

pushd demos\verifySolution
call npx webpack --mode=development
popd

echo.
echo DEV build complete. All demo bundles are unminified with source maps.
2 changes: 1 addition & 1 deletion demos/compareJSON/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 29 additions & 1 deletion demos/compareJSON/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@ const path = require('path');

const isProduction = process.env.NODE_ENV == 'production';

const createDevAliases = () => ({
'@esri/solution-common': path.resolve(__dirname, '../../packages/common/src/index.ts'),
'@esri/solution-creator': path.resolve(__dirname, '../../packages/creator/src/index.ts'),
'@esri/solution-deployer': path.resolve(__dirname, '../../packages/deployer/src/index.ts'),
'@esri/solution-feature-layer': path.resolve(__dirname, '../../packages/feature-layer/src/index.ts'),
'@esri/solution-file': path.resolve(__dirname, '../../packages/file/src/index.ts'),
'@esri/solution-form': path.resolve(__dirname, '../../packages/form/src/index.ts'),
'@esri/solution-group': path.resolve(__dirname, '../../packages/group/src/index.ts'),
'@esri/solution-hub-types': path.resolve(__dirname, '../../packages/hub-types/src/index.ts'),
'@esri/solution-simple-types': path.resolve(__dirname, '../../packages/simple-types/src/index.ts'),
'@esri/solution-storymap': path.resolve(__dirname, '../../packages/storymap/src/index.ts'),
'@esri/solution-velocity': path.resolve(__dirname, '../../packages/velocity/src/index.ts'),
'@esri/solution-viewer': path.resolve(__dirname, '../../packages/viewer/src/index.ts'),
'@esri/solution-web-experience': path.resolve(__dirname, '../../packages/web-experience/src/index.ts'),
'@esri/solution-web-tool': path.resolve(__dirname, '../../packages/web-tool/src/index.ts'),
'@esri/solution-workflow': path.resolve(__dirname, '../../packages/workflow/src/index.ts'),
});

const config = {
entry: './src/index.ts',
output: {
Expand All @@ -16,7 +34,12 @@ const config = {
module: {
rules: [{
test: /\.(ts|tsx)$/i,
loader: 'ts-loader',
use: {
loader: 'ts-loader',
options: {
transpileOnly: !isProduction,
},
},
exclude: ['/node_modules/'],
},{
test: /\.css$/i,
Expand All @@ -37,6 +60,11 @@ module.exports = () => {
config.mode = 'production';
} else {
config.mode = 'development';
config.devtool = 'source-map';
config.resolve.alias = {
...(config.resolve.alias || {}),
...createDevAliases(),
};
}
return config;
};
2 changes: 1 addition & 1 deletion demos/compareSolutions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 30 additions & 2 deletions demos/compareSolutions/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@ const path = require('path');

const isProduction = process.env.NODE_ENV == 'production';

const createDevAliases = () => ({
'@esri/solution-common': path.resolve(__dirname, '../../packages/common/src/index.ts'),
'@esri/solution-creator': path.resolve(__dirname, '../../packages/creator/src/index.ts'),
'@esri/solution-deployer': path.resolve(__dirname, '../../packages/deployer/src/index.ts'),
'@esri/solution-feature-layer': path.resolve(__dirname, '../../packages/feature-layer/src/index.ts'),
'@esri/solution-file': path.resolve(__dirname, '../../packages/file/src/index.ts'),
'@esri/solution-form': path.resolve(__dirname, '../../packages/form/src/index.ts'),
'@esri/solution-group': path.resolve(__dirname, '../../packages/group/src/index.ts'),
'@esri/solution-hub-types': path.resolve(__dirname, '../../packages/hub-types/src/index.ts'),
'@esri/solution-simple-types': path.resolve(__dirname, '../../packages/simple-types/src/index.ts'),
'@esri/solution-storymap': path.resolve(__dirname, '../../packages/storymap/src/index.ts'),
'@esri/solution-velocity': path.resolve(__dirname, '../../packages/velocity/src/index.ts'),
'@esri/solution-viewer': path.resolve(__dirname, '../../packages/viewer/src/index.ts'),
'@esri/solution-web-experience': path.resolve(__dirname, '../../packages/web-experience/src/index.ts'),
'@esri/solution-web-tool': path.resolve(__dirname, '../../packages/web-tool/src/index.ts'),
'@esri/solution-workflow': path.resolve(__dirname, '../../packages/workflow/src/index.ts'),
});

const config = {
entry: './src/index.ts',
output: {
Expand All @@ -16,7 +34,12 @@ const config = {
module: {
rules: [{
test: /\.(ts|tsx)$/i,
loader: 'ts-loader',
use: {
loader: 'ts-loader',
options: {
transpileOnly: !isProduction,
},
},
exclude: ['/node_modules/'],
},{
test: /\.css$/i,
Expand All @@ -37,12 +60,17 @@ module.exports = () => {
config.mode = 'production';
} else {
config.mode = 'development';
config.devtool = 'source-map';
config.resolve.alias = {
...(config.resolve.alias || {}),
...createDevAliases(),
};
}

config.experiments = {
...config.experiments,
topLevelAwait: true
}
};

return config;
};
2 changes: 1 addition & 1 deletion demos/copyItemInfo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 29 additions & 1 deletion demos/copyItemInfo/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@ const path = require('path');

const isProduction = process.env.NODE_ENV == 'production';

const createDevAliases = () => ({
'@esri/solution-common': path.resolve(__dirname, '../../packages/common/src/index.ts'),
'@esri/solution-creator': path.resolve(__dirname, '../../packages/creator/src/index.ts'),
'@esri/solution-deployer': path.resolve(__dirname, '../../packages/deployer/src/index.ts'),
'@esri/solution-feature-layer': path.resolve(__dirname, '../../packages/feature-layer/src/index.ts'),
'@esri/solution-file': path.resolve(__dirname, '../../packages/file/src/index.ts'),
'@esri/solution-form': path.resolve(__dirname, '../../packages/form/src/index.ts'),
'@esri/solution-group': path.resolve(__dirname, '../../packages/group/src/index.ts'),
'@esri/solution-hub-types': path.resolve(__dirname, '../../packages/hub-types/src/index.ts'),
'@esri/solution-simple-types': path.resolve(__dirname, '../../packages/simple-types/src/index.ts'),
'@esri/solution-storymap': path.resolve(__dirname, '../../packages/storymap/src/index.ts'),
'@esri/solution-velocity': path.resolve(__dirname, '../../packages/velocity/src/index.ts'),
'@esri/solution-viewer': path.resolve(__dirname, '../../packages/viewer/src/index.ts'),
'@esri/solution-web-experience': path.resolve(__dirname, '../../packages/web-experience/src/index.ts'),
'@esri/solution-web-tool': path.resolve(__dirname, '../../packages/web-tool/src/index.ts'),
'@esri/solution-workflow': path.resolve(__dirname, '../../packages/workflow/src/index.ts'),
});

const config = {
entry: './src/index.ts',
output: {
Expand All @@ -16,7 +34,12 @@ const config = {
module: {
rules: [{
test: /\.(ts|tsx)$/i,
loader: 'ts-loader',
use: {
loader: 'ts-loader',
options: {
transpileOnly: !isProduction,
},
},
exclude: ['/node_modules/'],
},{
test: /\.css$/i,
Expand All @@ -37,6 +60,11 @@ module.exports = () => {
config.mode = 'production';
} else {
config.mode = 'development';
config.devtool = 'source-map';
config.resolve.alias = {
...(config.resolve.alias || {}),
...createDevAliases(),
};
}
return config;
};
2 changes: 1 addition & 1 deletion demos/copySolutions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading