Closed dheidelberger closed 4 years ago
This is correct and has been something I've always been meaning to fix. Are you in need of complex removal or have a specific use case?
Thanks. Specifically, I want to strip my .vue files from the final build, which shouldn't be too hard once sign
starts checking every file. I also just forked this repo to see about trying to insert an obfuscation step after moving to the staging folder and before signing, but that's a separate issue. If I have time this weekend, I'll look into submitting a pull request for the .certignore issue. I'm endlessly impressed by the whole bombino workflow you've set up. It's saved me tons of time with my extensions.
Fair, have you considered stripping out the src
directory entirely? If you keep any images/assets in Public (assuming Vue CLI) this might be a much easier solution than checking for any *.vue files. The current setup in terms of file structure is biased to include scripting files inside src, but I've recently changed the main panel setup so that App.vue is no longer bloated and uses a newer NPM package for both <Menu>
and <Panel>
components here:
https://github.com/Inventsable/lokney
The above Panel component allows you to easily insert a custom path for script files rather than keeping them in src, and by default both should work exactly as they did in the original setup but are each refactored and better. These are already implemented in bombino templates and you can see them at work with a new panel, saves a ton of space and lets you place scripting files anywhere you want.
Also thanks! I've been meaning to revamp this section of bombino to be more like Quasar and Vue, and handle all things in a single .js config file rather than needing multiple ones like certignore. I'd appreciate any PRs, suggestions or ideas though
Interesting. I'll look into that, thanks. I did try playing around with ripping out various files from the src folder post-build, and for some reason, there were some .js files that Webpack still kept external (mostly helper files that I'd created). It was a while ago, so I don't remember off-hand what they were or how they were loaded, but it led me to believe the src folder, at least in some form, was still necessary. I don't know much about Webpack, so I'm sure I was doing something wrong.
It looks like fse.copy
can be fed a filter function that works recursively, so that could be a promising easy fix to the .certignore issue.
Generally speaking the src
directory contains developer specific and human readable code which is then compiled to dist
and should be safe to leave out (at least in production builds). I'd make the rookie mistake of including host
and scripting files as a convention inside bombino templates so I may have given others the wrong impression, but I'm hoping to solve that by including the new Panel component and allow people the flexibility to have their own file structures.
I'd appreciate any more notes or recommendations! As I said earlier this repo really deserves a full overhaul especially of the sign
command since I haven't updated it since the first version of my cep-vue-cli-generator
, and will likely want to place all config options inside a central bombino-config.js
file or similar.
Feel free to make PRs or open new issues on any of the repos. If you find yourself having trouble getting your current panel working, you can email me or invite me to your repo and I can take on something of a consultation role and try to help you getting it working.
It appears that the
sign
command only looks at files and folders in the root directory of the extension. So, for example, if I add.*\.js$
to the .certignore file, which should ignore all files with a .js extension,sign
will correctly excludebabel.config.js
andvue.config.js
, but the .js files in the src directory will never be tested against the regex, presumably becausefse.copy
instageExtensionFolder
copies entire folders, so the contents of those folders never gets checked.