nanopage icon indicating copy to clipboard operation
nanopage copied to clipboard

Restructuring

Open jondashkyle opened this issue 6 years ago • 3 comments

Added all sorts of fun stuff here.

  • Flat state for files, no more files key in pages, but uses regex in the same way as find.
  • Cleanup to reduce general clutter.
  • File utilities via require('nanopage/file').
  • Testing to cover these changes.
  • Documentation to explain what’s going on.

Still need some work, but though to create a pull request to begin tracking progress for what’s being discussed for content state. For example, we should determine what utilities we’d like file to expose. Perhaps something related to sizes and dimensions?

jondashkyle avatar May 20 '18 05:05 jondashkyle

Can now start messing with this by using the next tag on npm.

npm i nanopage@next --save

jondashkyle avatar May 21 '18 05:05 jondashkyle

A fun new one. Both the page() and file() methods accept a glob in addition to a path (string) and state (obj).

var images = page('../*.jpg').toArray()

jondashkyle avatar May 24 '18 02:05 jondashkyle

Relative urls have also been introduced.

var parentTitle = page('../').value('title')

This has been published as next2 to npm under the @next tag.

jondashkyle avatar May 24 '18 03:05 jondashkyle