Skip to content

Commit 746cf9e

Browse files
authored
Refactor and Dockerise (#110)
* Add Docker file * initial build pipeline change+docker commit * Refactoring * General cleanup * Update Docker file * Bump version and minor Docker compose changes * Fix library scripts and add GitHub Actions
1 parent e3257d5 commit 746cf9e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+8613
-5972
lines changed

.dockerignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**/.classpath
2+
**/.dockerignore
3+
**/.env
4+
**/.git
5+
**/.gitignore
6+
**/.project
7+
**/.settings
8+
**/.toolstarget
9+
**/.vs
10+
**/.vscode
11+
**/*.*proj.user
12+
**/*.dbmdl
13+
**/*.jfm
14+
**/azds.yaml
15+
**/charts
16+
**/docker-compose*
17+
**/Dockerfile*
18+
**/node_modules
19+
**/npm-debug.log
20+
**/obj
21+
**/secrets.dev.yaml
22+
**/values.dev.yaml
23+
README.md

.github/workflows/nodejs.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [10.x, 12.x]
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v1
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
- run: npm ci
28+
- run: npm run build --if-present
29+
env:
30+
CI: true

.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 2,
4+
"semi": true,
5+
"singleQuote": true,
6+
"endOfLine": "crlf",
7+
"printWidth": 120,
8+
"parser": "typescript"
9+
}

.vscode/tasks.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "pack",
8+
"command": "npm run pack"
9+
},
10+
{
11+
"label": "build",
12+
"command": "npm run build"
13+
}
14+
]
15+
}

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM node:12-stretch
2+
WORKDIR /usr/src/levelup
3+
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
4+
RUN npm install -g gulp-cli --silent && npm install --silent && mv node_modules ../
5+
COPY . .
6+
ENV NODE_ENV=development
7+
CMD npm run pack

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,5 @@ if(process.env.NODE_ENV === 'development'){
109109
* [Rocket Icon by Jerry Low](https://www.iconfinder.com/jerrylow)
110110
* [Chrome extension kickstart yo generator by HaNdTrix](https://github.com/HaNdTriX/generator-chrome-extension-kickstart)
111111
* [Copy Text to Clipboard by Sindre Sorhus](https://github.com/sindresorhus/copy-text-to-clipboard)
112-
* [Enable/Disable new navigation by Jared Johnson](https://www.magnetismsolutions.com/blog/jaredjohnson/2018/11/27/dynamics-365-v9-1-enable-unified-interface-ui-updates-on-upgraded-organizations)
112+
* [Enable/Disable new navigation by Jared Johnson](https://www.magnetismsolutions.com/blog/jaredjohnson/2018/11/27/dynamics-365-v9-1-enable-unified-interface-ui-updates-on-upgraded-organizations)
113+
* [Chrome Extension Yeoman Generator](https://github.com/mazamachi/generator-chrome-extension-kickstart-typescript)

app/manifest.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
{
22
"background": {
3-
"scripts": ["background.js"],
3+
"scripts": ["/scripts/background.js"],
44
"persistant": false
55
},
66
"browser_action": {
77
"default_icon": {
8-
"16": "icon-16.png"
8+
"16": "/images/icon-16.png"
99
},
1010
"default_title": "Level up for Dynamics 365/Power Apps",
11-
"default_popup": "options.html"
11+
"default_popup": "/pages/options.html"
1212
},
1313
"name": "Level up for Dynamics 365/Power Apps",
1414
"author": "Natraj Yegnaraman",
1515
"description": "Quickly perform advanced/hidden actions in Dynamics 365/Power Apps, without bookmarklets.",
1616
"content_scripts": [
1717
{
1818
"matches": ["http://*/*", "https://*/*"],
19-
"js": ["app.js"]
19+
"js": ["/scripts/app.js"]
2020
}
2121
],
2222
"icons": {
23-
"16": "icon-16.png",
24-
"48": "icon-48.png",
25-
"128": "icon-128.png"
23+
"16": "/images/icon-16.png",
24+
"48": "/images/icon-48.png",
25+
"128": "/images/icon-128.png"
2626
},
2727
"permissions": ["activeTab", "tabs"],
28-
"web_accessible_resources": ["Sdk.Soap.min.js", "levelup.extension.js"],
29-
"version": "3.4.6",
30-
"version_name": "3.4.6",
28+
"web_accessible_resources": ["/scripts/Sdk.Soap.min.js", "/scripts/levelup.extension.js"],
29+
"version": "3.5.0",
30+
"version_name": "3.5.0",
3131
"manifest_version": 2
3232
}

app/pages/grid.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ <h2 id="header"></h2>
5555
</tbody>
5656
</table>
5757
</div>
58-
<script src="list.min.js"></script>
59-
<script src="grid.js"></script>
58+
<script src="../scripts/list.min.js"></script>
59+
<script src="../scripts/grid.js"></script>
6060
</body>
6161
</html>

app/pages/options.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -413,12 +413,10 @@
413413
</section>
414414
</main>
415415
</div>
416-
<script src="options.js"></script>
417-
<link rel="stylesheet" href="styles/material-icons.min.css">
418-
<!-- <link rel="stylesheet" href="../libraries/material.min.css">
419-
<script defer src="../libraries/material.min.js"></script> -->
420-
<link rel="stylesheet" href="material.min.css">
421-
<script defer src="material.min.js"></script>
416+
<script src="../scripts/options.js"></script>
417+
<link rel="stylesheet" href="../styles/material-icons.min.css">
418+
<link rel="stylesheet" href="../styles/material.min.css">
419+
<script defer src="../scripts/material.min.js"></script>
422420
</div>
423421
</body>
424422

app/pages/optionsets.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ <h2 id="header"></h2>
6060
</tbody>
6161
</table>
6262
</div>
63-
<script src="list.min.js"></script>
64-
<script src="optionsets.js"></script>
63+
<script src="../scripts/list.min.js"></script>
64+
<script src="../scripts/optionsets.js"></script>
6565
</body>
6666
</html>

0 commit comments

Comments
 (0)