0.2.24 • Published 9 years ago

grunt-pebbletools v0.2.24

Weekly downloads
1
License
-
Repository
github
Last release
9 years ago

grunt-pebbletools Build Status

tools for pebble projects. pebblefields

Getting Started

TODO ...

npm install grunt-pebbletools --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-pebbletools');

The "pebbletools" task

Overview

In your project's Gruntfile, add a section named pebbletools to the data object passed into grunt.initConfig().

grunt.initConfig({
  pebbletools: {
    options: {
      // Task-specific options go here.
    },
    deploy: {
      outputTemplates: ['path/to/template/_file'], //the file must start with '_', deploy will create the output file without the '_'
    },
    compress: {
      outputTemplates: ['path/to/template/_file'], //the file must start with '_', deploy will create the output file without the '_'
    },
    extract: {
      outputTemplates: ['path/to/template/_file'], //the file must start with '_', deploy will create the output file without the '_'
    },
    compile: {

    },
    setup: {
      
    },
    json2xml: {
      input: 'input/file.json',
      output: 'output/file.json'
    },
    xml2json: {
      input: 'input/file.json',
      output: 'output/file.json'
    },
    prettify: {
      input: 'input/file.json',
      output: 'output/file.json',
      mode: 'json' //json, xml, sql, css
    },
    minify: {
      input: 'input/file.json',
      output: 'output/file.json',
      mode: 'json' //json, xml, sql, css
    },
    changeSpec: {
      input: 'input/file.json',
      output: 'output/file.json',
      tableFilter: function(table) {
        var name = table.getTagName();
        if (name === 'theModel_ ....') {
          return table;
          }
      },
      changePeb: function (peb, data) {

        //do something with peb
      	var longRef = peb.getRef(".");
        if (longRef && longRef.indexOf("theModel") != -1) {
          var newRef = longRef.replace("theModel", "wootwoot");
          peb.setRef(".", newRef);
        }

        //optionally, do children
        var recs = peb.getRecords(".");
        for (var i = 0; i < recs.length; i++) {
          var rec = recs[i];
          data.changePeb(rec, data);
        }
      }
    }
  },
});

Options

Release History

(Nothing yet)

0.2.24

9 years ago

0.2.23

9 years ago

0.2.22

9 years ago

0.2.21

10 years ago

0.2.20

10 years ago

0.2.19

10 years ago

0.2.18

10 years ago

0.2.17

10 years ago

0.2.14

10 years ago

0.2.13

10 years ago

0.2.12

10 years ago

0.2.11

10 years ago

0.2.10

10 years ago

0.2.9

10 years ago

0.2.8

10 years ago

0.2.7

10 years ago

0.2.6

10 years ago

0.2.5

10 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.93

10 years ago

0.1.92

10 years ago

0.1.91

10 years ago

0.1.90

10 years ago

0.1.89

10 years ago

0.1.88

10 years ago

0.1.87

10 years ago

0.1.86

10 years ago

0.1.85

10 years ago

0.1.83

10 years ago

0.1.82

10 years ago

0.1.81

10 years ago

0.1.80

10 years ago

0.1.79

10 years ago

0.1.78

10 years ago

0.1.77

10 years ago

0.1.76

10 years ago

0.1.75

10 years ago

0.1.74

10 years ago

0.1.73

10 years ago

0.1.72

10 years ago

0.1.71

10 years ago

0.1.70

10 years ago

0.1.69

10 years ago

0.1.68

10 years ago

0.1.67

10 years ago

0.1.66

10 years ago

0.1.65

10 years ago

0.1.64

10 years ago

0.1.63

10 years ago

0.1.62

10 years ago

0.1.61

10 years ago

0.1.60

10 years ago

0.1.52

10 years ago

0.1.51

10 years ago

0.1.50

10 years ago

0.1.49

10 years ago

0.1.48

10 years ago

0.1.47

10 years ago

0.1.46

10 years ago

0.1.45

10 years ago

0.1.44

10 years ago

0.1.43

10 years ago

0.1.42

10 years ago

0.1.41

10 years ago

0.1.40

10 years ago

0.1.39

10 years ago

0.1.38

10 years ago

0.1.37

10 years ago

0.1.36

10 years ago

0.1.35

10 years ago

0.1.34

10 years ago

0.1.33

10 years ago

0.1.32

10 years ago

0.1.31

10 years ago

0.1.30

10 years ago

0.1.29

10 years ago

0.1.28

10 years ago

0.1.27

10 years ago

0.1.26

10 years ago

0.1.25

10 years ago

0.1.24

10 years ago

0.1.23

10 years ago

0.1.22

10 years ago

0.1.21

10 years ago

0.1.20

10 years ago

0.1.19

10 years ago

0.1.18

10 years ago

0.1.17

10 years ago

0.1.16

10 years ago

0.1.15

10 years ago

0.1.14

10 years ago

0.1.12

10 years ago