Publish.jl: A Universal Document Authoring Package for Julia

Publish.jl

A universal document authoring package for Julia.  

Disclaimer

Currently this package should be regarded as experimental --- a proving ground for new features for the Julia documentation ecosystem rather than a mature and proven piece of software. If you need a solution that will definitely work, look at Documenter.jl instead.

This is a package for Julia that provides a general framework for writing prose --- technical documentation is its focus, though it is general enough to be applied to any kind of written document.

Some standout features:

  • built-in live server to view your changes in real-time,
  • uses a fully-compliant commonmark parser, CommonMark.jl,
  • produces HTML and PDF files natively, no LaTeX dependencies to manage yourself,
  • publication-quality PDF generation uses tectonic for self-contained, reproducible builds,
  • combine markdown files, Jupyter notebooks, and Julia files for your content,
  • supports themes to customise both HTML and PDF output,
  • and declarative configuration built on top of Julia's Pkg.jl package manager.

Publish can scale from single pages all the way to large cross-referenced multi-project documents.

To jump straight in and begin using Publish run the following in your Julia REPL:

pkg> add Publish

julia> using Publish

julia> serve(Publish)
✓ LiveServer listening on http://localhost:8000/ ...
  (use CTRL+C to shut down)

The above will install Publish, import it, and then start up a local web-server for Publish's own documentation --- the content you're reading right now. Open the link in your web browser and then continue on to the next section, Getting Started.

Download Details:

Author: MichaelHatherly
Source Code: https://github.com/MichaelHatherly/Publish.jl 
License: View license

#julia #markdown #publish 

Publish.jl: A Universal Document Authoring Package for Julia

GH-pages-deploy: Publish to Gh-pages From Package.json

GH-pages-deploy

Deploy straight to github pages with one simple command.

Usage

# install it from npm and symlink it into your PATH
npm install gh-pages-deploy -g

# now run it!
gh-pages-deploy

You can also use npm run to package it with your app without installing it globally.

First add this to your scripts section of package.json:

  "scripts": {
    "deploy": "gh-pages-deploy",
    "clean-source": "rimraf README.md src webroot package.json"
  },

And then install gh-pages-deploy as a devDependency:

npm install gh-pages-deploy --save-dev

And now you can run npm run deploy to run the gh-pages-deploy installed in the local node_modules folder (even if you have never done npm install gh-pages-deploy -g).

You can also provide a custom commit message via command line argument:

  "scripts": {
    "deploy": "gh-pages-deploy -- 'A custom commit message'",
  },

Options

To configure gh-pages-deploy all you need to do is specify a couple of things in your package.json (all of which are optional)

  "gh-pages-deploy": {
    "staticpath": "dist",
    "cname": "nope.org",
    "prep": [
      "build-sass",
      "optimize-img"
    ],
    "commit": "a custom commit message",
    "post": [
      "clean-source"
    ],
    "noprompt": false
  },
  • "staticpath" path to your files to be copied over to the root directory
  • "cname" content for CNAME file
  • "prep" an array of script names to run before pushing to github, this can be any script that you have declared in your "scripts" object in your package.json.
  • "commit" a custom commit message to be used when committing to git
  • "post" an array of script names to run after "prep", but before add/commit/push
  • "noprompt" if this is set to true, the prompt will be bypassed and you will never need to confirm the commands before deploying.

About

This repo uses gh-pages-deploy. Checkout the gh-pages branch and the result at http://davejustice.com/gh-pages-deploy/.

This was inspired after a conversation with max ogden regarding the setup of the Code For Portland Jekyll Pages. Inspired by the leveldb.org repository, I wanted an easier way for people to generate static pages and deploy to github without being tied to just jekyll.

Author: Meandavejustice
Source Code: https://github.com/meandavejustice/gh-pages-deploy 
License: MIT license

#javascript #publish #command #node 

GH-pages-deploy: Publish to Gh-pages From Package.json

Publish JS Project As Dual ES Modules & CommonJS Package to NPM

Dual Publish

Publish JS project as dual ES modules and CommonJS package to npm.

  • Tested on projects with 16M downloads per month.
  • CI tests with it works with Node.js, browsers, React Native, bundlers (webpack, Parcel, Rollup, or esbuild) and CDNs (like jspm).
  • Does not change line numbers in stacktrace and keep sources readable.
  • No build step. No need for separated src/ and dist/ dirs in repository. You will be able to test branch by installing version from GitHub like npm i example@you/example#fix.
  • Multiple files support. Your user will be able to import separated files 
    like import { nanoid } from 'nanoid/async'.
  • Cleans npm package from development configs before publishing.
  • Supports process.env.NODE_ENV for development checks, which you want to remove in production JS bundle.

You write CommonJS in your npm library sources:

// index.js
module.exports = { lib }

npx dual-publish compiles your library during publishing to npm:

// index.js
export { lib }

// index.cjs
module.exports = { lib }

// package.json
{
  …
  "type": "module",
  "module": "index.js",
  "main": "index.cjs",
  "exports": {
    "require": "./index.cjs",
    "import": "./index.js"
  }
}

Now your library can be imported natively as ESM or CommonJS:

// CommonJS
let { lib } = require('lib')

// ESM in Node.js, webpack, Parcel, and Rollup
import { lib } from 'lib'

// ESM in browser
import { lib } from 'https://cdn.jsdelivr.net/npm/lib/index.js'

Sponsored by Evil Martians 

Limits

  • We recommend to avoid default export because of bug in webpack.
  • Every JS file should be in own dir. lib/index.js instead of lib.js. We need it to put package.json with module.

Usage

Take a normal CommonJS project with require() and module.exports =.

Because of bug in webpack we recommend to use only named exports:

const NAME = 'a'
function change {
  …
}

module.exports = { NAME, change }

Move all files into separated dirs. Rename lib.js to lib/index.js. Old require('./lib') will work.

Add dual-publish to the project:

npm i --save-dev dual-publish

Test the result by calling npx dual-publish --check. It will create a folder in your project with converted files. Review them manually.

Publish your project with npx dual-publish instead of npm publish.

npx dual-publish

Author: Ai
Source Code: https://github.com/ai/dual-publish 
License: MIT license

#node #npm #javascript #publish 

Publish JS Project As Dual ES Modules & CommonJS Package to NPM
Cyril  Parisian

Cyril Parisian

1619269140

Rider 2020.3.3 and ReSharper Tools 2020.3.3 Have Landed!

Hello everyone!

We‘ve just published the ReSharper Tools 2020.3.3 and Rider 2020.3.3 releases. Here’s a quick synopsis of the most critical fixes we’ve delivered with these builds.

#.net tools #releases #c# 9 #publish #unity

Rider 2020.3.3 and ReSharper Tools 2020.3.3 Have Landed!

How to Create a Blog With Publish

Did you know that you can create a static blog with Swift? In this tutorial we are going to look at how to do that with Publish.

#swift #publish

How to Create a Blog With Publish