Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build script and security #25

Open
Tracked by #65
badlydrawnrob opened this issue Jul 19, 2019 · 0 comments
Open
Tracked by #65

Build script and security #25

badlydrawnrob opened this issue Jul 19, 2019 · 0 comments
Assignees
Labels
dependencies Pull requests that update a dependency file help wanted Extra attention is needed

Comments

@badlydrawnrob
Copy link
Owner

badlydrawnrob commented Jul 19, 2019

Explaining some of the build problems

You'll need to reference some (or all) of these problems in the advanced tutorial for Anki Themes) — especially the "Github dependencies" and "NPM commands" which should be to-the-point and leave no need for thinking. Remember to hide complexity when writing the docs.

The Pandoc build script is a little hard to remember:

The Pandoc documentation is pretty verbose, and I struggle with it. I also want to be aware of security concerns with NPM such as here.

  1. Output a standalone file
  2. Using a template file --template=./source/pandoc/template.html (you can use variables also)
  3. By default Pandoc outputs a fragment ...
  4. To include a custom CSS file (or many), use -c or --css flag!
  5. --embed-resources: a standalone document with no external dependencies?
  6. Tidy up build scripts? #24 (make things simpler?)7.

NPM commands: Updating your packages

npm can install and run your "scripts".
npx seems to allow you to run CLI commands locally (like this website builder).
I tend towards installing packages locally (not globally)

⚠️ Neither npm update, nor npm install <package> will update to the latest version if you're using ~ or ^ semver ranges!!! Why? Read on ...

🏆 You can specify the @major version with npm install. Alternatively, you must change package.json dependency version first, then npm update to that version. Can be done programatically or manually.

  1. Dev dependencies currently updating range only (patch/minor)
    • View npm outdated for regular packages (it won't show GitHub dependancies) and npm update (why won't it update to latest version?)
    • View the Change Log before updating to a major version!
    • npm list --depth 1 will list package dependencies (1 level deep)
  2. More on NPM Dependencies and scripts

Such a lot of reading, for such a simple thing 🤬😩

Github dependencies: It get's worse!

GitHub repositories that are dependencies don't update at all!! 😔

Make sure you change the #commit-number on the end of the dependency url. You'll also need to explicitly update the package npm update print-first-css.

Use a makefile and watch changes?

An interesting approach to auto-load changes for .less files in this article.


I think I was using the Marked App to compile the specimen.md and styleguide.md files:

You can view the original .md files here

  1. Adding the print-first-markdown css file to the app
  2. Using it with yaml code Marked Style: print-first-markdown.
  3. Marked App uses highlight.js to render code blocks
This was referenced Jul 19, 2019
@badlydrawnrob badlydrawnrob added help wanted Extra attention is needed dependencies Pull requests that update a dependency file labels Nov 30, 2023
@badlydrawnrob badlydrawnrob changed the title Build script security Build script and security Nov 30, 2023
@badlydrawnrob badlydrawnrob self-assigned this Dec 1, 2023
@badlydrawnrob badlydrawnrob mentioned this issue Jan 29, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant