Git Product home page Git Product logo

docpad-plugin-moment's People

Contributors

brockfanning avatar pavel-voronin avatar robloach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docpad-plugin-moment's Issues

Not working with Docpad 6.80.3

Was working with docpad 6.79.4, but after updating to 6.80.3 seeing the following error:

�[33mwarning:�[39m Failed to load the plugin: docpad-plugin-moment at /Volumes/Data/Users/username/Documents/projects/website/node_modules/docpad-plugin-moment
The error follows:

TypeError: Class constructor BasePlugin cannot be invoked without 'new'
at new MomentPlugin (/Volumes/Data/Users/username/Documents/projects/website/node_modules/docpad-plugin-moment/out/moment.plugin.js:16:51)
at PluginLoader.create (/Volumes/Data/Users/username/.nvm/versions/node/v8.11.3/lib/node_modules/docpad/esnext/lib/plugin-loader.js:260:26)
at /Volumes/Data/Users/username/.nvm/versions/node/v8.11.3/lib/node_modules/docpad/esnext/lib/docpad.js:3600:29
at PluginLoader.load (/Volumes/Data/Users/username/.nvm/versions/node/v8.11.3/lib/node_modules/docpad/esnext/lib/plugin-loader.js:240:7)
at /Volumes/Data/Users/username/.nvm/versions/node/v8.11.3/lib/node_modules/docpad/esnext/lib/docpad.js:3595:27
at PluginLoader.unsupported (/Volumes/Data/Users/username/.nvm/versions/node/v8.11.3/lib/node_modules/docpad/esnext/lib/plugin-loader.js:146:7)
at /Volumes/Data/Users/username/.nvm/versions/node/v8.11.3/lib/node_modules/docpad/esnext/lib/docpad.js:3573:25
at success (/Volumes/Data/Users/username/.nvm/versions/node/v8.11.3/lib/node_modules/docpad/esnext/lib/plugin-loader.js:71:16)
at safefs.readFile (/Volumes/Data/Users/username/.nvm/versions/node/v8.11.3/lib/node_modules/docpad/esnext/lib/plugin-loader.js:110:18)
at /Volumes/Data/Users/username/.nvm/versions/node/v8.11.3/lib/node_modules/docpad/node_modules/graceful-fs/graceful-fs.js:78:16
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)

Example formats not working?

I can't seem to get your formats to work. :(

Works fine:
<%= @moment(@document.date).format('MMM Do, YYYY') %>

Does not work (no output):
<%- @humanDate %>

docpad.coffee:

docpadConfig = {
    plugins:
        moment:
            formats: [
                {raw: "date", format: "MMMM Do, YYYY", formatted: "humanDate"}
                {raw: "date", format: "YYYY-MM-DD", formatted: "computerDate"}
            ]
}
module.exports = docpadConfig

Any help would be appreciated.

npm -v 1.4.24
node -v v0.10.31
docpad --version v6.69.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.