How to use oc - 10 common examples

To help you get started, we’ve selected a few oc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github redhat-developer-tooling / developer-platform-install / test / check-requirements.js View on Github external
function checkRequirements() {
  for (var attribute in reqs) {
    // sha256 is not set for macOS Java SE
    if(reqs[attribute].sha256sum !== '') {
      data[attribute] = reqs[attribute].url;
      count++;
    }
  }

  //to check if the url looks like it points to what it is supposed to
  fileNames['cdk.zip'] = 'cdk';
  fileNames['rhel-vagrant-virtualbox.box'] = 'vagrant-virtualbox.box';
  fileNames['oc.zip'] = 'oc-origin-cli';
  fileNames['cygwin.exe'] = 'cygwin';
  fileNames['jbds.jar'] = 'devstudio';
  fileNames['jdk.msi'] = 'openjdk';
  fileNames['vagrant.msi'] = 'vagrant';
  fileNames['virtualbox.exe'] = 'virtualbox';
  fileNames['7zip.zip'] = '7-Zip';
  fileNames['7zip-extra.zip'] = '7-Zip';

  //to check if the files are rougly the size they should be
  minSizes['cdk.zip'] = 50 * 1024;
  minSizes['rhel-vagrant-virtualbox.box'] = 750 * 1024 * 1024;
  minSizes['oc.zip'] = 10 * 1024 * 1024;
  minSizes['cygwin.exe'] = 500 * 1024;
  minSizes['jbds.jar'] = 400 * 1024 * 1024;
  minSizes['jdk.msi'] = 50 * 1024 *1024;
  minSizes['vagrant.msi'] = 80 * 1024 * 1024;
github ivandoric / Making-Websites-With-October-CMS / plugins / rainlab / builder / formwidgets / formbuilder / assets / js / formbuilder.domtopropertyjson.js View on Github external
if (!listItem.hasAttribute('data-control-type')) {
                // There could be other items - placeholders
                // and clear-row elements
                continue
            }

            var values = getControlPropertyValues(listItem)
            if (values === null) {
                throw new Error('Property values are not found for a control list item.')
            }

            if (values['oc.fieldName'] === undefined) {
                throw new Error('Field name property is not found for a control.')
            }

            var fieldName = values['oc.fieldName']

            values.type = listItem.getAttribute('data-control-type')
            preProcessSpecialProperties(values)

            if (injectProperties !== undefined) {
                values = $.extend(values, injectProperties)
            }

            if (result[fieldName] !== undefined) {
                throw new Error('Duplicate field name: ' + fieldName)
            }

            // If a control contains control containers, parse them
            // and assign parsed object to the current control property.

            var childControls = parseControlControlContainer(listItem)
github redhat-developer-tooling / developer-platform-install / test / check-requirements.js View on Github external
//to check if the url looks like it points to what it is supposed to
  fileNames['cdk.zip'] = 'cdk';
  fileNames['rhel-vagrant-virtualbox.box'] = 'vagrant-virtualbox.box';
  fileNames['oc.zip'] = 'oc-origin-cli';
  fileNames['cygwin.exe'] = 'cygwin';
  fileNames['jbds.jar'] = 'devstudio';
  fileNames['jdk.msi'] = 'openjdk';
  fileNames['vagrant.msi'] = 'vagrant';
  fileNames['virtualbox.exe'] = 'virtualbox';
  fileNames['7zip.zip'] = '7-Zip';
  fileNames['7zip-extra.zip'] = '7-Zip';

  //to check if the files are rougly the size they should be
  minSizes['cdk.zip'] = 50 * 1024;
  minSizes['rhel-vagrant-virtualbox.box'] = 750 * 1024 * 1024;
  minSizes['oc.zip'] = 10 * 1024 * 1024;
  minSizes['cygwin.exe'] = 500 * 1024;
  minSizes['jbds.jar'] = 400 * 1024 * 1024;
  minSizes['jdk.msi'] = 50 * 1024 *1024;
  minSizes['vagrant.msi'] = 80 * 1024 * 1024;
  minSizes['virtualbox.exe'] = 85 * 1024 * 1024;
  minSizes['7zip.zip'] = 200 * 1024;
  minSizes['7zip-extra.zip'] = 400 * 1024;

  console.log('-------------------------------');
  console.log('Checking download URLs');
  for (var key in data) {
    checkFileName(key);
    checkUrl(key);
  }
}
github vladfolts / oberonjs / test / compile.js View on Github external
addFile: function(file){
        console.info("compiling '" + file + "...")
        var text = fs.readFileSync(file, "utf8");
        var stream = new Stream(text);
        var module = oc.compileModule(
              stream,
              this.__rtl,
              this.__resolveModule.bind(this),
              function(e){this.__handleErrors(file, e);}.bind(this)
              );
        if (!module)
            return undefined;

        this.__code += module.code();

        var symbol = module.symbol();
        this.__modules[symbol.id()] = symbol.info();
        return symbol.info();
    },
    code: function(){return this.__rtl.generate() + this.__code;},
github vladfolts / oberonjs / test / test_compile.js View on Github external
function compile(src, language){
    var text = fs.readFileSync(src, "utf8");
    var errors = "";
    var result = oc.compile(text, language, function(e){errors += e;}, extractOptions(text));
    if (errors)
        throw new Test.TestError(errors);
    return result;
}
github vladfolts / oberonjs / test / test_compile.js View on Github external
function expectError(src, dirs, language){
    var text = fs.readFileSync(src, "utf8");
    var errors = "";
    try {
        oc.compile(text, language, function(e){errors += e + "\n";});
    }
    catch (e){
        errors += e;
    }
    if (!errors.length)
        throw new Test.TestError("compiler error expected");
    var resultName = path.basename(src).replace(".ob", ".txt");
    compareResults(errors, resultName, dirs);
}
github vladfolts / oberonjs / test / test_unit_common.js View on Github external
return setup(function(s){
                oc.compileModule(grammar,
                                 new Stream.Type(s),
                                 new TestContext(language, function(){return module;}));
            });},
        pass,
github vladfolts / oberonjs / test / test_unit_common.js View on Github external
function compileModule(src, language){
    var imported = oc.compileModule(language.grammar, new Stream.Type(src), makeContext(language));
    return imported.symbol().info();
}
github opencomponents / oc-template-react / acceptance-setup / __tests__ / acceptance.js View on Github external
(err, compiledInfo) => {
      if (err) {
        return done(err);
      }

      registry = new Registry({
        local: true,
        discovery: true,
        verbosity: 0,
        path: path.join(__dirname, "../../acceptance-components"),
        port: registryPort,
        baseUrl: registryUrl,
        env: { name: "local" },
        hotReloading: false,
        templates: [require("../../packages/oc-template-react")]
      });

      registry.start(err => {
        if (err) {
          return done(err);
        }
        testServer = server(serverPort, err => {

oc

A framework for developing and distributing html components

MIT
Latest version published 2 months ago

Package Health Score

74 / 100
Full package analysis