Skip to content

Commit b21b58e

Browse files
author
John Agan
committed
bumped version, added npm action, fixed babel export
1 parent 00940b6 commit b21b58e

File tree

6 files changed

+38
-7
lines changed

6 files changed

+38
-7
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"presets": ["@babel/preset-env"],
3-
"plugins": [],
3+
"plugins": ["@babel/plugin-transform-modules-commonjs"],
44
"env": {
55
"development": {
66
"sourceMaps": "inline"
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+
name: webflow-api
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-node@v3
16+
with:
17+
node-version: 16
18+
- run: npm test
19+
20+
publish-npm:
21+
needs: build
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: actions/setup-node@v3
26+
with:
27+
node-version: 16
28+
registry-url: https://registry.npmjs.org/
29+
- run: npm publish
30+
env:
31+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webflow-api",
3-
"version": "0.6.0",
3+
"version": "0.7.0",
44
"description": "SDK for the Webflow CMS API",
55
"main": "dist/index.js",
66
"jsnext:main": "src/index.js",

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
module.exports = require('./Webflow');
2-
module.exports.WebflowError = require('./WebflowError').default;
1+
module.exports = require("./Webflow").default;
2+
module.exports.WebflowError = require("./WebflowError").default;

test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import nock from "nock";
44
import test from "ava";
55

6-
import Webflow, { WebflowError } from "./src";
6+
import Webflow, { WebflowError } from "./dist";
77

88
test("Requires an access token", (t) => {
99
t.throws(

0 commit comments

Comments
 (0)