Skip to content

Commit 02872ff

Browse files
authored
Postmessage to iframe (#99)
* Updated tracking code for GTM. * Updated render/parser lib. * Updating sample * Adding vue-sequence-ext.css back. * Added promotion link to the confluence plugin. * Removed debugger from main.js. * Removed service-worker generation task from the gulp file * Updated vue-sequence 0.9.3 (embedded User svg in URL). * Removed service worker. I just do not understand how it works. It has made debugging supper difficult. * Added render function to new Vue() to solve the CSP error. https://medium.com/@acesubido/solving-csp-problems-on-vue-2-0-and-rails-webpacker-3-5-7f2faf086aff * Removed unused script-src. * Removed all permissions. * Updated core to 0.9.4. Fixed issue: B->A:message. * Get vue-sequence--ext.css back. * Show export image buttons. * Fixed Export to images. * Clean vue-sequence-bundle before build. * Fixed yml format. * Added environment variables. * Converted tabs to spaces. * Removed file-loader 6. * Removed xd client. * reverted file-loader. * update to node v10. * Revert "Removed xd client." This reverts commit 5bfc5b3 * Fixed issue that CSS is not applied. * Updated deploy script. * Call webpack during preact's build. * Added message listener to the iFrame. * Post message when JS code changes. * Post message when the iFrame is loaded for the first time. * removed xdclient * Fix style.css in preview.html. * Added workflow to deploy to prod. * Added workflow to deploy to prod. * Fixed yml file format. * Fixed yml file format.
1 parent a2019eb commit 02872ff

File tree

2 files changed

+33
-4
lines changed

2 files changed

+33
-4
lines changed

.github/workflows/deploy-prod.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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: Deploy to Prod
5+
6+
on:
7+
push:
8+
tags:
9+
- release-*
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
node-version: [10.x]
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
- run: yarn install && yarn webpack && yarn build
26+
- run: yarn release
27+
- run: yarn deploy:prod --token ${{ secrets.FIREBASE_TOKEN }}

gulpfile.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ gulp.task('copyFiles', function () {
5656
gulp.src(`src/lib/vue-sequence-bundle.*.js`).pipe(gulp.dest('app/lib')),
5757
gulp.src('icons/*').pipe(gulp.dest('app/icons')),
5858
gulp.src(['help.html','ZenUML_Sequence_Diagram_addon_help.html',
59-
'src/preview.html',
6059
'src/detached-window.js',
6160
'src/icon-16.png',
6261
'src/icon-48.png',
@@ -81,6 +80,7 @@ gulp.task('copyFiles', function () {
8180
gulp.src('src/lib/hint.min.css').pipe(gulp.dest('build/lib')),
8281
gulp.src('src/lib/inlet.css').pipe(gulp.dest('build/lib')),
8382
gulp.src('src/style.css').pipe(hashFilename()).pipe(gulp.dest('build')),
83+
gulp.src('src/preview.html').pipe(gulp.dest('build')),
8484
gulp.src([
8585
'src/FiraCode.ttf',
8686
'src/FixedSys.ttf',
@@ -94,7 +94,7 @@ gulp.task('copyFiles', function () {
9494
// Generate script.js, vendor.js, style.css and vendor.css and index.html under ./app/
9595
gulp.task('useRef', function () {
9696
return gulp
97-
.src('build/index.html')
97+
.src('build/*.html')
9898
.pipe(useref())
9999
.pipe(gulp.dest('app'));
100100
});
@@ -131,11 +131,13 @@ gulp.task('minify', function () {
131131

132132
gulp.task('fixIndex', function () {
133133
var contents = fs.readFileSync('build/index.html', 'utf8');
134-
135134
// style.css is replaced with style-[hash].css
136135
contents = contents.replace(/style\.css/g, fsUtil.getHashedFile('build', 'style-', 'css'));
137-
138136
fs.writeFileSync('build/index.html', contents, 'utf8');
137+
contents = fs.readFileSync('build/preview.html', 'utf8');
138+
// style.css is replaced with style-[hash].css
139+
contents = contents.replace(/style\.css/g, fsUtil.getHashedFile('build', 'style-', 'css'));
140+
fs.writeFileSync('build/preview.html', contents, 'utf8');
139141
});
140142

141143
gulp.task('packageExtension', function () {

0 commit comments

Comments
 (0)