Skip to content

Commit

Permalink
update demo_npm with new dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtynjala committed Oct 2, 2023
1 parent 7fb4ad5 commit 8659867
Show file tree
Hide file tree
Showing 39 changed files with 350 additions and 309 deletions.
5 changes: 3 additions & 2 deletions samples/demo_npm/as3/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
bin
node_modules/
bin/js-debug/
bin/js-release/
*.map
12 changes: 7 additions & 5 deletions samples/demo_npm/as3/asconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@
"node_modules/openfl/dist/openfl.swc",
"node_modules/starling-framework/dist/starling.swc"
],
"source-map": true,
"targets": [
"js"
"JS"
]
},
"files":
[
"src/Main.as"
]
"additionalOptions": [
"-js-getter-prefix=get_",
"-js-setter-prefix=set_"
],
"mainClass": "Main"
}
22 changes: 10 additions & 12 deletions samples/demo_npm/as3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@
"version": "1.0.0",
"private": true,
"devDependencies": {
"@apache-royale/cli": "^0.1.0",
"@apache-royale/royale-js": "^0.9.3",
"asconfigc": "^0.6.9",
"@apache-royale/royale-js": "^0.9.11",
"asconfigc": "^1.8.0",
"cpx": "^1.5.0",
"howler": "^2.0.12",
"openfl": "^8.1.1",
"pako": "^1.0.6",
"starling-framework": "^2.3.3"
"http-server": "^14.1.1",
"openfl": "^8.9.6",
"starling-framework": "^2.5.1"
},
"scripts": {
"build": "npm run build:dev",
"build:dev": "cpx \"assets/**/*.*\" bin/js-debug/assets && cpx node_modules/openfl/dist/openfl.min.js bin/js-debug && cpx node_modules/howler/dist/howler.min.js bin/js-debug && cpx node_modules/starling-framework/dist/starling.min.js bin/js-debug && cpx node_modules/pako/dist/pako.min.js bin/js-debug && asconfigc --debug=true",
"build:prod": "cpx \"assets/**/*.*\" bin/js-release/assets && cpx node_modules/openfl/dist/openfl.min.js bin/js-release && cpx node_modules/howler/dist/howler.min.js bin/js-release && cpx node_modules/starling-framework/dist/starling.min.js bin/js-release && cpx node_modules/pako/dist/pako.min.js bin/js-release && asconfigc --debug=false",
"build": "npm run build:prod",
"build:dev": "cpx \"assets/**/*.*\" bin/js-debug/assets && cpx favicon.png bin/js-debug && cpx node_modules/starling-framework/dist/starling.min.js bin/js-debug && cpx node_modules/openfl/dist/openfl.min.js bin/js-debug && cpx node_modules/pako/dist/pako.min.js bin/js-debug && cpx node_modules/howler/dist/howler.min.js bin/js-debug && asconfigc --debug=true",
"build:prod": "cpx \"assets/**/*.*\" bin/js-release/assets && cpx favicon.png bin/js-release && cpx node_modules/starling-framework/dist/starling.min.js bin/js-release && cpx node_modules/openfl/dist/openfl.min.js bin/js-release && cpx node_modules/pako/dist/pako.min.js bin/js-release && cpx node_modules/howler/dist/howler.min.js bin/js-release && asconfigc --debug=false",
"start": "npm run start:dev",
"start:dev": "npm run build:dev && royale serve:debug",
"start:prod": "npm run build:prod && royale serve:release"
"start:dev": "npm run build:dev && http-server bin/js-debug",
"start:prod": "npm run build:prod && http-server bin/js-release"
}
}
4 changes: 2 additions & 2 deletions samples/demo_npm/es5/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules
dist/app.js
node_modules/
dist/
*.map
22 changes: 10 additions & 12 deletions samples/demo_npm/es5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@
"version": "1.0.0",
"private": true,
"devDependencies": {
"copy-webpack-plugin": "^4.3.1",
"openfl": "^8.1.1",
"starling-framework": "*",
"uglifyjs-webpack-plugin": "^1.1.4",
"webpack": "^3.10.0",
"webpack-dev-server": "^2.9.7",
"webpack-merge": "^4.1.1",
"write-file-webpack-plugin": "^4.2.0"
"copy-webpack-plugin": "^11.0.0",
"openfl": "^8.9.6",
"starling-framework": "^2.5.1",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
},
"scripts": {
"build": "npm run build:prod",
"build:dev": "webpack --config webpack.dev.js",
"build:prod": "webpack --config webpack.prod.js",
"build:dev": "webpack --mode=development",
"build:prod": "webpack --mode=production",
"start": "npm run start:dev",
"start:dev": "webpack-dev-server --open --config webpack.dev.js",
"start:prod": "webpack-dev-server --open --config webpack.prod.js"
"start:dev": "webpack serve --mode=development",
"start:prod": "webpack serve --mode=production"
}
}
Binary file added samples/demo_npm/es5/public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions samples/demo_npm/es5/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!doctype html>
<html>
<head>
<title>Starling Demo</title>
<link rel="shortcut icon" type="image/png" href="./favicon.png">
<style>
html,body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
#openfl-content { background: #000000; width: 100%; height: 100%; }
@font-face {
font-family: 'DejaVu Sans';
src: url('assets/fonts/DejaVuSans.eot');
src: url('assets/fonts/DejaVuSans.eot?#iefix') format('embedded-opentype'),
url('assets/fonts/DejaVuSans.svg#my-font-family') format('svg'),
url('assets/fonts/DejaVuSans.woff') format('woff'),
url('assets/fonts/DejaVuSans.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Ubuntu';
src: url('assets/fonts/Ubuntu-R.eot');
src: url('assets/fonts/Ubuntu-R.eot?#iefix') format('embedded-opentype'),
url('assets/fonts/Ubuntu-R.svg#my-font-family') format('svg'),
url('assets/fonts/Ubuntu-R.woff') format('woff'),
url('assets/fonts/Ubuntu-R.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
</style>
</head>
<body>
<div id="openfl-content"></div>
<script src="./app.js"></script>
</body>
</html>
23 changes: 0 additions & 23 deletions samples/demo_npm/es5/webpack.common.js

This file was deleted.

25 changes: 25 additions & 0 deletions samples/demo_npm/es5/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const path = require("path");
const CopyWebpackPlugin = require("copy-webpack-plugin");

module.exports = {
entry: "./src/demo.js",
output: {
path: path.resolve(__dirname, "dist"),
filename: "app.js"
},
devtool: "source-map",
resolve: {
alias: {
"openfl": path.resolve(__dirname, "node_modules/openfl/lib/openfl"),
"starling": path.resolve(__dirname, "node_modules/starling-framework/lib/starling")
}
},
plugins: [
new CopyWebpackPlugin({
patterns: [
"public",
{ from: path.resolve(__dirname, "../../demo/assets"), to: "assets" }
]
})
]
};
9 changes: 0 additions & 9 deletions samples/demo_npm/es5/webpack.dev.js

This file was deleted.

16 changes: 0 additions & 16 deletions samples/demo_npm/es5/webpack.prod.js

This file was deleted.

4 changes: 2 additions & 2 deletions samples/demo_npm/es6/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"presets": ["env"],
"plugins": ["transform-class-properties"]
"presets": ["@babel/preset-env"],
"plugins": ["@babel/plugin-transform-class-properties"]
}
4 changes: 2 additions & 2 deletions samples/demo_npm/es6/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules
dist/app.js
node_modules/
dist/
*.map
29 changes: 13 additions & 16 deletions samples/demo_npm/es6/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,23 @@
"version": "1.0.0",
"private": true,
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-preset-env": "^1.6.1",
"copy-webpack-plugin": "^4.3.1",
"openfl": "^8.1.1",
"starling-framework": "*",
"uglifyjs-webpack-plugin": "^1.1.4",
"webpack": "^3.10.0",
"webpack-dev-server": "^2.9.7",
"webpack-merge": "^4.1.1",
"write-file-webpack-plugin": "^4.2.0"
"copy-webpack-plugin": "^11.0.0",
"@babel/core": "^7.23.0",
"@babel/plugin-transform-class-properties": "^7.22.5",
"@babel/preset-env": "^7.22.20",
"babel-loader": "^9.1.3",
"openfl": "^8.9.6",
"starling-framework": "^2.5.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
},
"scripts": {
"build": "npm run build:prod",
"build:dev": "webpack --config webpack.dev.js",
"build:prod": "webpack --config webpack.prod.js",
"build:dev": "webpack --mode=development",
"build:prod": "webpack --mode=production",
"start": "npm run start:dev",
"start:dev": "webpack-dev-server --open --config webpack.dev.js",
"start:prod": "webpack-dev-server --open --config webpack.prod.js"
"start:dev": "webpack serve --mode=development",
"start:prod": "webpack serve --mode=production"
},
"dependencies": {}
}
Binary file added samples/demo_npm/es6/public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions samples/demo_npm/es6/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!doctype html>
<html>
<head>
<title>Starling Demo</title>
<link rel="shortcut icon" type="image/png" href="./favicon.png">
<style>
html,body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
#openfl-content { background: #000000; width: 100%; height: 100%; }
@font-face {
font-family: 'DejaVu Sans';
src: url('assets/fonts/DejaVuSans.eot');
src: url('assets/fonts/DejaVuSans.eot?#iefix') format('embedded-opentype'),
url('assets/fonts/DejaVuSans.svg#my-font-family') format('svg'),
url('assets/fonts/DejaVuSans.woff') format('woff'),
url('assets/fonts/DejaVuSans.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Ubuntu';
src: url('assets/fonts/Ubuntu-R.eot');
src: url('assets/fonts/Ubuntu-R.eot?#iefix') format('embedded-opentype'),
url('assets/fonts/Ubuntu-R.svg#my-font-family') format('svg'),
url('assets/fonts/Ubuntu-R.woff') format('woff'),
url('assets/fonts/Ubuntu-R.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
</style>
</head>
<body>
<div id="openfl-content"></div>
<script src="./app.js"></script>
</body>
</html>
28 changes: 0 additions & 28 deletions samples/demo_npm/es6/webpack.common.js

This file was deleted.

30 changes: 30 additions & 0 deletions samples/demo_npm/es6/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const path = require("path");
const CopyWebpackPlugin = require("copy-webpack-plugin");

module.exports = {
entry: "./src/demo.js",
output: {
path: path.resolve(__dirname, "dist"),
filename: "app.js"
},
devtool: "source-map",
resolve: {
alias: {
"openfl": path.resolve(__dirname, "node_modules/openfl/lib/openfl"),
"starling": path.resolve(__dirname, "node_modules/starling-framework/lib/starling")
}
},
module: {
rules: [
{ test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" }
]
},
plugins: [
new CopyWebpackPlugin({
patterns: [
"public",
{ from: path.resolve(__dirname, "../../demo/assets"), to: "assets" }
]
})
]
};
9 changes: 0 additions & 9 deletions samples/demo_npm/es6/webpack.dev.js

This file was deleted.

16 changes: 0 additions & 16 deletions samples/demo_npm/es6/webpack.prod.js

This file was deleted.

Loading

0 comments on commit 8659867

Please sign in to comment.