Skip to content

Commit

Permalink
npm: update dependencies and add to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtynjala committed Oct 2, 2023
1 parent 38baeac commit e3d5430
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 42 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on: [push, pull_request]
jobs:

package-haxelib:
runs-on: macos-latest
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/upload-artifact@v2
with:
Expand All @@ -26,10 +26,10 @@ jobs:
if-no-files-found: error

docs:
runs-on: macos-latest
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: krdlab/setup-haxe@v1
with:
Expand All @@ -53,4 +53,32 @@ jobs:
with:
name: actuate-docs
path: docs
if-no-files-found: error
if-no-files-found: error

build-npm:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Install Dependencies
run: |
npm install
- name: Build Library
run: |
npm run build
- name: Package Library for npm
run: |
npm pack
- uses: actions/upload-artifact@v3
with:
name: actuate-npm
path: actuate-*.tgz
if-no-files-found: error
23 changes: 13 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"name": "actuate",
"version": "1.8.9-beta",
"version": "1.9.0",
"description": "Actuate is a flexible, fast \"tween\" library",
"keywords": [
"tween",
"animation",
"openfl"
],
"homepage": "https://github.com/jgranick/actuate",
"homepage": "https://github.com/openfl/actuate",
"bugs": {
"url": "https://github.com/jgranick/actuate/issues"
"url": "https://github.com/openfl/actuate/issues"
},
"license": "MIT",
"contributors": [
"Joshua Granick"
"Joshua Granick",
"Other OpenFL contributors"
],
"types": "lib/motion/index.d.ts",
"main": "dist/actuate.min.js",
Expand All @@ -27,7 +28,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/jgranick/actuate.git"
"url": "https://github.com/openfl/actuate.git"
},
"scripts": {
"build": "npm run build-lib && npm run build-lib-esm && npm run build-dist && npm run build-swc",
Expand All @@ -39,17 +40,19 @@
"prepublishOnly": "npm run build"
},
"config": {
"haxe": "3.4.4"
"haxe": "3.4.7"
},
"devDependencies": {
"@apache-royale/royale-js": "^0.9.3",
"@apache-royale/royale-js": "^0.9.8",
"brotli-webpack-plugin": "^1.1.0",
"compression-webpack-plugin": "^10.0.0",
"globby": "^8.0.1",
"haxe": "^5.2.1",
"hxgenjs": "kevinresol/hxgenjs",
"openfl": "^6.5.3-alpha.6",
"uglifyjs-webpack-plugin": "^1.1.4",
"webpack": "^3.10.0",
"webpack-merge": "^4.1.1"
"webpack": "^5.79.0",
"webpack-cli": "^5.0.1",
"webpack-merge": "^5.8.0"
},
"dependencies": {}
}
32 changes: 16 additions & 16 deletions scripts/docs.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -3,85 +3,85 @@
-xml xml/Flash.xml
-swf obj/docs
-swf-version 17.0
-D display
-D display=usage
-D doc_gen
ImportAll
--macro include("motion")
-cp ../src
--no-output

# --next

# -xml xml/Windows.xml
# -cpp obj/docs
# -D display
# -D display=usage
# -D windows
# -D doc_gen
# ImportAll
# --macro include("motion")
# -cp ../src
# --no-output

# --next

# -xml xml/macOS.xml
# -cpp obj/docs
# -D display
# -D display=usage
# -D mac
# -D doc_gen
# ImportAll
# --macro include("motion")
# -cp ../src
# --no-output

# --next

# -xml xml/Linux.xml
# -cpp obj/docs
# -D display
# -D display=usage
# -D linux
# -D doc_gen
# ImportAll
# --macro include("motion")
# -cp ../src
# --no-output

# --next

# -xml xml/Neko.xml
# -neko obj/docs
# -D display
# -D display=usage
# -D doc_gen
# ImportAll
# --macro include("motion")
# -cp ../src
# --no-output

# --next

# -xml xml/iOS.xml
# -cpp obj/docs
# -D display
# -D display=usage
# -D ios
# -D doc_gen
# ImportAll
# --macro include("motion")
# -cp ../src
# --no-output

# --next

# -xml xml/Android.xml
# -cpp obj/docs
# -D display
# -D display=usage
# -D android
# -D doc_gen
# ImportAll
# --macro include("motion")
# -cp ../src
# --no-output

# --next

# -xml xml/HTML5.xml
# -js obj/docs
# -D display
# -D display=usage
# -D html5
# -D doc_gen
# ImportAll
# --macro include("motion")
# -cp ../src
# --no-output

Expand Down
3 changes: 2 additions & 1 deletion webpack.dev.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const webpack = require ("webpack");
const merge = require ("webpack-merge");
const { merge } = require ("webpack-merge");
const common = require ("./webpack.common.js");
const package = require ("./package.json");

Expand All @@ -12,6 +12,7 @@ var banner = "/*!\n"
+ " */\n"

module.exports = merge (common, {
mode: "development",
output: {
filename: "actuate.js"
},
Expand Down
20 changes: 10 additions & 10 deletions webpack.prod.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
const webpack = require ("webpack");
const merge = require ("webpack-merge");
const UglifyJSPlugin = require ("uglifyjs-webpack-plugin");
const { merge } = require ("webpack-merge");
const BrotliPlugin = require ('brotli-webpack-plugin');
const CompressionPlugin = require ("compression-webpack-plugin");
const common = require ("./webpack.common.js");
const package = require ("./package.json");

var banner = "/*! Actuate v" + package.version + " | MIT (c) Joshua Granick | https://github.com/jgranick/actuate */\n"

module.exports = merge (common, {
mode: "production",
output: {
filename: "actuate.min.js"
},
plugins: [
new UglifyJSPlugin ({
sourceMap: true,
uglifyOptions: {
// warnings: true
}
}),
new webpack.BannerPlugin ({
banner: banner,
raw: true,
entryOnly: true
}),
new webpack.DefinePlugin ({
"process.env.NODE_ENV": JSON.stringify ("production")
new CompressionPlugin ({
include: /[A-Za-z0-9]*\.min\.js$/
}),
new BrotliPlugin ({
asset: '[path].br[query]',
test: /[A-Za-z0-9]*\.min\.js$/
})
]
});

0 comments on commit e3d5430

Please sign in to comment.