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

Force rebuild #36

Open
jostylr opened this issue Apr 19, 2018 · 1 comment
Open

Force rebuild #36

jostylr opened this issue Apr 19, 2018 · 1 comment

Comments

@jostylr
Copy link
Owner

jostylr commented Apr 19, 2018

Request:

That said, we've found it difficult to integrate literate-programming
into our build chains, as literate-programming lacks a command line
flag that can be used to force literate-programming to regenerate files
even when the sources associated with those files have not changed. For
comparison, GNU Make includes such a flag (-B).

Can you add a flag to forcibly regenerate output files?

@jostylr
Copy link
Owner Author

jostylr commented Apr 19, 2018

Temporary solution. Intend to add this feature in rewrite.

  1. If you can delete a file in your build process, you can delete .checksum in the build directory and that will force everything to be rebuilt.
  2. You can create a file called lprc.js in your project root directory and put the following code in it:
module.exports = function(Folder, args) {

    Folder.checksum.tosave = function (name, text) {
        var self = this;
        var data = self.data;

        var sha = self.sha1sync(text);

        return sha; 
    }

};

This replaces the default checking function 'tosave' with one that always returns a truthy value and hence everything will get saved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant