Skip to content

Commit

Permalink
Remove esbuild optimiser
Browse files Browse the repository at this point in the history
  • Loading branch information
MonicaOlejniczak committed Aug 20, 2024
1 parent d99d151 commit 96ae0a5
Show file tree
Hide file tree
Showing 42 changed files with 84 additions and 480 deletions.
26 changes: 0 additions & 26 deletions packages/examples/eslint-example/package.json

This file was deleted.

File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions packages/examples/eslint/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "@atlaspack/eslint-example",
"version": "2.12.0",
"license": "MIT",
"private": true,
"scripts": {
"build": "atlaspack build src/index.js"
},
"devDependencies": {
"@atlaspack/cli": "^2.12.0",
"@atlaspack/config-default": "^2.12.0",
"@atlaspack/validator-eslint": "^2.12.0"
}
}
File renamed without changes.
9 changes: 1 addition & 8 deletions packages/examples/html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,9 @@
"license": "MIT",
"private": true,
"scripts": {
"demo": "atlaspack build src/index.html"
"start": "atlaspack src/index.html --open"
},
"browserslist": [
"last 2 versions",
"not edge < 76",
"not firefox < 67"
],
"devDependencies": {
"@babel/core": "^7.22.11",
"@atlaspack/babel-register": "2.12.0",
"@atlaspack/cli": "2.12.0"
},
"dependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/examples/html/src/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>HTML Example</title>
<script type="module" src="./index.js"></script>
<title>Atlaspack | HTML Example</title>
<script type="module" src="index.js"></script>
</head>
<body>
<h1>Hello world</h1>
Expand Down
4 changes: 0 additions & 4 deletions packages/examples/internalize-example/async.js

This file was deleted.

2 changes: 0 additions & 2 deletions packages/examples/internalize-example/index-other.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/examples/internalize-example/index-sync.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/examples/internalize-example/index.html

This file was deleted.

6 changes: 0 additions & 6 deletions packages/examples/internalize-example/index.js

This file was deleted.

6 changes: 0 additions & 6 deletions packages/examples/internalize-example/package.json

This file was deleted.

24 changes: 0 additions & 24 deletions packages/examples/kitchen-sink/legacy.html

This file was deleted.

24 changes: 0 additions & 24 deletions packages/examples/kitchen-sink/modern.html

This file was deleted.

22 changes: 8 additions & 14 deletions packages/examples/kitchen-sink/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@
"license": "MIT",
"private": true,
"scripts": {
"serve": "atlaspack serve src/index.html --https --open",
"build": "rm -rf dist && atlaspack build src/index.html --no-cache"
"start": "atlaspack src/index.html --https --open"
},
"dependencies": {
"@swc/helpers": "^0.5.0",
"lodash": "^4.17.11",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@babel/core": "^7.22.11",
"@atlaspack/babel-register": "2.12.0",
"@atlaspack/cli": "2.12.0",
"@atlaspack/config-default": "2.12.0",
"@atlaspack/core": "2.12.0",
"@atlaspack/optimizer-esbuild": "2.12.0",
"@atlaspack/reporter-sourcemap-visualiser": "2.12.0"
"@atlaspack/cli": "^2.12.0"
},
"targets": {
"browserModern": {
Expand All @@ -33,10 +32,5 @@
]
}
}
},
"dependencies": {
"lodash": "^4.17.11",
"react": "^17.0.2",
"react-dom": "^17.0.2"
}
}
6 changes: 4 additions & 2 deletions packages/examples/kitchen-sink/src/async.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
require('./paragraphs.css');
import './paragraphs.css';

console.log(require('react'));
import React from 'react';

console.log('react', React);
require('lodash');

class Foo {}
8 changes: 4 additions & 4 deletions packages/examples/kitchen-sink/src/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Modern Simple Example</title>
<title>Atlaspack | Kitchen Sink Example</title>
<link rel="stylesheet" href="styles.css" />
<script src="index.js"></script>
<script type="module" src="index.js"></script>
</head>
<body>
<h1>I am an H1</h1>
Expand Down
13 changes: 5 additions & 8 deletions packages/examples/kitchen-sink/src/index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import styles from './styles.css';
import atlaspack from 'url:./atlaspack.webp';
import {message} from './message';

import('./async');
import('./async2');

new Worker(new URL('worker.js', import.meta.url));
new Worker(new URL('worker.js', import.meta.url), {type: 'module'});

console.log(message);

// const message = require('./message');
// const fs = require('fs');
let icon = document.createElement('img');
icon.src = atlaspack;
icon.width = 100;

// console.log(message);
// console.log(fs.readFileSync(__dirname + '/test.txt', 'utf8'));

// class Test {}
document.body.prepend(icon);
1 change: 1 addition & 0 deletions packages/examples/kitchen-sink/src/worker.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
const textUrl = require('url:./test.txt');

console.log('logged from worker.js', textUrl);
20 changes: 2 additions & 18 deletions packages/examples/react-hmr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,10 @@
"license": "MIT",
"private": true,
"scripts": {
"demo": "atlaspack serve src/index.html --no-cache --https"
"start": "atlaspack src/index.html --https --open"
},
"devDependencies": {
"@atlaspack/cli": "2.12.0"
},
"targets": {
"browserModern": {
"engines": {
"browsers": [
"last 1 Chrome version"
]
}
},
"browser": {
"engines": {
"browsers": [
"> 0.25%"
]
}
}
"@atlaspack/cli": "^2.12.0"
},
"dependencies": {
"react": "^17.0.2",
Expand Down
8 changes: 3 additions & 5 deletions packages/examples/react-hmr/src/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Atlaspack | React Example</title>
</head>
<body>
<div id="app"></div>

<script src="index.js"></script>
<script type="module" src="index.js"></script>
</body>
</html>
6 changes: 2 additions & 4 deletions packages/examples/react-refresh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
"license": "MIT",
"private": true,
"scripts": {
"start": "atlaspack src/index.html"
"start": "atlaspack src/index.html --open"
},
"devDependencies": {
"@babel/core": "^7.22.11",
"@atlaspack/babel-register": "2.12.0",
"@atlaspack/core": "2.12.0"
"@atlaspack/cli": "^2.12.0"
},
"dependencies": {
"react": "^17.0.2",
Expand Down
3 changes: 0 additions & 3 deletions packages/examples/simple/.atlaspackrc

This file was deleted.

23 changes: 2 additions & 21 deletions packages/examples/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,9 @@
"license": "MIT",
"private": true,
"scripts": {
"build": "ATLASPACK_WORKERS=0 atlaspack src/index.js --no-cache",
"clean-demo": "rm -rf .atlaspack-cache dist && yarn demo"
"build": "atlaspack build src/index.js"
},
"devDependencies": {
"@babel/core": "^7.22.11",
"@atlaspack/babel-register": "2.12.0",
"@atlaspack/core": "2.12.0"
},
"browser": "dist/legacy/index.js",
"browserModern": "dist/modern/index.js",
"targets": {
"browser": {
"engines": {
"browsers": [
"last 1 Chrome version"
]
}
}
},
"dependencies": {
"lodash": "^4.17.11",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"@atlaspack/cli": "^2.12.0"
}
}
6 changes: 0 additions & 6 deletions packages/examples/three/.atlaspackrc

This file was deleted.

2 changes: 0 additions & 2 deletions packages/examples/three/.gitignore

This file was deleted.

9 changes: 0 additions & 9 deletions packages/examples/three/Makefile

This file was deleted.

35 changes: 0 additions & 35 deletions packages/examples/three/package.json

This file was deleted.

Loading

0 comments on commit 96ae0a5

Please sign in to comment.