Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gsper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tools
gsper
Commits
9f776e15
Commit
9f776e15
authored
6 years ago
by
Millicent Billette
Browse files
Options
Downloads
Patches
Plain Diff
FIX: extend compatibility by removing module mention in prod
parent
a786a0f4
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitlab-ci.yml
+1
-0
1 addition, 0 deletions
.gitlab-ci.yml
build.js
+1
-5
1 addition, 5 deletions
build.js
package.json
+1
-0
1 addition, 0 deletions
package.json
prod.js
+16
-0
16 additions, 0 deletions
prod.js
public/index.html
+1
-2
1 addition, 2 deletions
public/index.html
with
20 additions
and
7 deletions
.gitlab-ci.yml
+
1
−
0
View file @
9f776e15
...
@@ -9,6 +9,7 @@ build-and-clean:
...
@@ -9,6 +9,7 @@ build-and-clean:
-
npm install
-
npm install
-
npm run postinstall
-
npm run postinstall
-
npm run build
-
npm run build
-
npm run prod
artifacts
:
artifacts
:
untracked
:
true
untracked
:
true
paths
:
paths
:
...
...
This diff is collapsed.
Click to expand it.
build.js
+
1
−
5
View file @
9f776e15
...
@@ -7,8 +7,4 @@ try{fs.writeFileSync("public/vendors/nacl.js",(fs.readFileSync("public/vendors/n
...
@@ -7,8 +7,4 @@ try{fs.writeFileSync("public/vendors/nacl.js",(fs.readFileSync("public/vendors/n
.
replace
(
"
(function(nacl) {
"
,
"
var nacl = {};
"
)
.
replace
(
"
(function(nacl) {
"
,
"
var nacl = {};
"
)
.
replace
(
"
})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {}));
"
,
"
export {nacl};
"
)
.
replace
(
"
})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {}));
"
,
"
export {nacl};
"
)
,
"
utf8
"
);}
catch
(
e
)
{
console
.
error
(
e
);}
,
"
utf8
"
);}
catch
(
e
)
{
console
.
error
(
e
);}
// let js = fs.readFileSync("node_modules/jparticles/production/jparticles.js","utf8");
// js += fs.readFileSync("node_modules/jparticles/production/particle.js","utf8");
// js += fs.readFileSync("main.js","utf8");
// fs.writeFileSync("main.js",js,"utf8");
// fs.writeFileSync("index.html",(fs.readFileSync("index.html","utf8")).replace(/(.*node_modules.*)/g,''),"utf8");
This diff is collapsed.
Click to expand it.
package.json
+
1
−
0
View file @
9f776e15
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
"scripts"
:
{
"scripts"
:
{
"postinstall"
:
"node build.js"
,
"postinstall"
:
"node build.js"
,
"build"
:
"rollup public/worker.js --format iife --file public/generated.worker.js && rollup public/main.js --format iife --file public/generated.main.js"
,
"build"
:
"rollup public/worker.js --format iife --file public/generated.worker.js && rollup public/main.js --format iife --file public/generated.main.js"
,
"prod"
:
"node prod.js"
,
"test"
:
"echo open public/test.html in your browser"
"test"
:
"echo open public/test.html in your browser"
},
},
"repository"
:
{
"repository"
:
{
...
...
This diff is collapsed.
Click to expand it.
prod.js
0 → 100644
+
16
−
0
View file @
9f776e15
const
fs
=
require
(
"
fs
"
);
change
(
`<script type="module" src="main.js"></script>`
,
`<script src="generated.main.js"></script>`
,
`public/index.html`
);
change
(
`Worker('generated.worker.js',{type:"module"})`
,
`Worker('generated.worker.js')`
,
`public/generated.main.js`
);
function
change
(
thisString
,
withThisString
,
inThisFile
)
{
try
{
fs
.
writeFileSync
(
inThisFile
,(
fs
.
readFileSync
(
inThisFile
,
"
utf8
"
))
.
replace
(
thisString
,
withThisString
)
,
"
utf8
"
);}
catch
(
e
)
{
console
.
error
(
e
);}
}
This diff is collapsed.
Click to expand it.
public/index.html
+
1
−
2
View file @
9f776e15
...
@@ -97,7 +97,6 @@ space::[ _-.]{0,1}
...
@@ -97,7 +97,6 @@ space::[ _-.]{0,1}
</style>
</style>
</a>
</a>
</footer>
</footer>
<!--<script type="module" src="main.js"></script>-->
<script
type=
"module"
src=
"main.js"
></script>
<script
src=
"generated.main.js"
></script>
</body>
</body>
</html>
</html>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment